I use this type of construct often.
response = new LocationResponse ();
response.LocationDetails = new LocationDetail[4];
response.LocationDetails[0] = new LocationDetail();
response.LocationDetails[0].site = "ABCDE";
...
The piece I don't fully understand is this piece:
response.LocationDetails[0] = new LocationDetail();
Why does each individual element of the array have to be instantiated?
If you leave it out, you get undefined exceptions.