public new static Switch LoadFromFile(string fileName) { FileStream file = null; StreamReader sr = null; try { file = new FileStream(fileName, FileMode.Open, FileAccess.Read); sr = new StreamReader(file); string xmlString = sr.ReadToEnd(); sr.Close(); file.Close(); return Deserialize(xmlString); } finally { if ((file != null)) { file.Dispose(); } if ((sr != null)) { sr.Dispose(); } } } }