I’m trying to translate some code from VB.Net to C#, but I’ve run into an issue.
The Vb.Net line of code I want to translate is:
client.Applicants = New wcf_Integration.Applicant() {New wcf_Integration.Applicant}
I tried to translate it to:
Client.Applicants = new wcf_Integration.Applicant[1];
Client.Applicants[0] = new Applicant();
However, this is giving me a nasty ‘Object reference is not set to an instance of an object’ error.
Any help on this would be very much appreciated. 🙂
You can also use the array initializer syntax