public static SkillList Load(string Filename) { SkillList skills; using (System.IO.FileStream fs = System.IO.File.OpenRead(Filename)) skills = SkillList.Load(fs); return(skills); }
public static SkillList Load( System.IO.Stream s ) { SkillList skills; XmlSerializer xml = new XmlSerializer( typeof( SkillList ) ); try { skills = xml.Deserialize( s ) as SkillList; } catch( Exception e ) { System.Diagnostics.Debug.WriteLine( e ); skills = new SkillList(); } return skills; }
public static SkillList Load(System.IO.Stream s) { SkillList skills; XmlSerializer xml = new XmlSerializer(typeof(SkillList)); try { skills = xml.Deserialize(s) as SkillList; } catch (Exception e) { System.Diagnostics.Debug.WriteLine(e); skills = new SkillList(); } return(skills); }