static void TestLoad() { FileDictionary file = new FileDictionary(); file.LoadFromFile_Stream(); file.PrintLoad(); }
static void GetInput(FileDictionary fileDictionary) { if (fileDictionary._Dict.ContainsKey(fileDictionary.Serial)) { fileDictionary.Serial++; } Console.WriteLine("输入一组字符串:"); string s = Console.ReadLine(); Console.WriteLine("输入一个整数:"); int n = int.Parse(Console.ReadLine()); Console.WriteLine("输入一个小数:"); double d = double.Parse(Console.ReadLine()); var input1 = new Input_and_Load(s, n, d); input1.ID = fileDictionary.Serial; fileDictionary._Dict.Add(fileDictionary.Serial, input1); }
//static string Seriallize() //{ //} static void TestSave(FileDictionary fileDictionary) { fileDictionary.SaveToFile_Stream(); }