Exemple #1
0
        /// <summary>
        /// Binary deserialization from file to memory.
        /// </summary>
        public static T Read <T>(string fileName) where T : UFTree, new()
        {
            T tree;

            using (BinaryReader br = new BinaryReader(File.Open(fileName, FileMode.Open, FileAccess.Read, FileShare.Read)))
            {
                tree = UFTree.Read <T>(br);
            }
            return(tree);
        }