gbrainy.Core.Main.PlayerHistory.Load C# (CSharp) Method

Load() public method

public Load ( ) : void
return void
        public void Load()
        {
            try {
                if (File.Exists (file) == false)
                    return;

                using (FileStream str = File.OpenRead (file))
                {
                    XmlSerializer bf = new XmlSerializer (typeof (List <GameSessionHistory>));
                        games = (List <GameSessionHistory>) bf.Deserialize(str);
                }
            }
            catch (Exception e)
            {
                Console.WriteLine ("PlayerHistory.Load. Could not load file {0}. Error {1}", file, e);
            }
        }