I have an object which I need to populate with some data. But when I try to populate the Party, I get a null reference error.
The object: https://pastebin.pl/view/f9f34c0e (Basically an object with 2 objects that contain an array of other objects)
Initializing:
Models.InHouse.TestSpec.InhouseOrder io = new Models.InHouse.TestSpec.InhouseOrder {
Header = new Models.InHouse.TestSpec.InhouseOrderHeader { Party = new Models.InHouse.TestSpec.InhouseOrderHeaderParty[10] },
content = new Models.InHouse.TestSpec.InhouseOrderContent { Item = new Models.InHouse.TestSpec.InhouseOrderContentItem[100] }};
But when I try to access io.header.Party[0].ID
I get a Null Reference error. In the end, I will serialize it to a XML.