我有以下类...我如何初始化一些值
我的问题是,我如何在Main上初始化RootObject与一些值例如
Rootobject robj = new Rootobject();
robj.inchistor.Add()
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace JsonSample3
{
public class Customerinfo
{
public string customername { get; set; }
public string address { get; set; }
public string postcode { get; set; }
}
public class Inchistory
{
public Customerinfo customerinfo { get; set; }
public string r { get; set; }
public string reference { get; set; }
public string region { get; set; }
}
public class …Run Code Online (Sandbox Code Playgroud)