Not sure what you are asking. Are you looking for a combination of object and collection initialization?
RootObject robj = new RootObject()
{
inchistory = new List()
{
new Inchistory()
{
r = "foo",
reference = "bar",
customerinfo = new CustomerInfo()
{
customername = "joe blogs",
address = "somewhere",
postcode = "xxx xxxx"
},
region = "somewhere"
},
new Inchistory()
{
// etc
}
}
};
Or if you don't have things to add right now, you can just do:
RootObject robj = new RootObject()
{
inchistory = new List()
};
Or you could actually initialize the list inside the class constructor as David suggested.