public static void Run() { NormalClass n = new NormalClass(); n.X = 12; n.Y = "78"; n.Z = 4.6; n.V = 'c'; //string s = SerializeCodeGenerator.ToJson(n); //string s = ToJson(n); //string s = ToJsonFunc(n); string s = ShiboSerializer.ToJson(n); Console.WriteLine(s); //SerializeCodeGenerator.CreateCodeDll1(); }
public static void Array() { NormalClass item = new NormalClass(); item.X = 12; item.Y = "78"; item.Z = 4.6; item.V = 'c'; object[] value = new object[6]; for (int i = 0; i < value.Length; i++) { value[i] = item; } string s = CsvSerializer.ToCsv(value); Console.WriteLine(s); }
public static void List() { NormalClass item = new NormalClass(); item.X = 12; item.Y = "78"; item.Z = 4.6; item.V = 'c'; List <NormalClass> value = new List <NormalClass>(); value.Add(item); value.Add(item); value.Add(item); value.Add(item); string s = CsvSerializer.ToCsv(value); Console.WriteLine(s); }