or
//Serializing
public static ArtOfTest.WebAii.Design.Execution.TestResult GetConfigEnvironment(string strPath)
{
XmlSerializer ser = new XmlSerializer(typeof(ArtOfTest.WebAii.Design.Execution.TestResult));
using (var settingsFile = System.IO.File.OpenRead(strPath))
{
return (ArtOfTest.WebAii.Design.Execution.TestResult)ser.Deserialize(settingsFile);
}
}