public static void TestObjectBytesConversion() { Outter o = new Outter(); byte[] bytes = ObjectToByteArray(o); Outter obj = (Outter)ByteArrayToObject(bytes); // Assert.AreEqual(3, obj.li[1].Mi); // TODO }
public static void TestUseNullable() { Outter outter = new Outter(); Console.WriteLine(outter?.Inner?.MI?.Name); Console.WriteLine(outter?.Inner == null); var s = outter?.Inner?.MI == null ? "a" : "b"; Assert.AreEqual(s, "b"); }