I have the following code...
NameValue[] pair = new NameValue[1];
pair[0].Name = "SomeValue";
pair[0].Value = "Some Value";
This throws a null pointer exception. Is this the correct way to initialize the NaneValue?
I have the following code...
NameValue[] pair = new NameValue[1];
pair[0].Name = "SomeValue";
pair[0].Value = "Some Value";
This throws a null pointer exception. Is this the correct way to initialize the NaneValue?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
AlanRank #669 · 3.6K reputationPosted Oct 12, 2007, 1:40 PM EDT
You're missing a step:
NameValue[] pair = new NameValue[1];
pair[0] = new NameValue();
pair[0].Name = "SomeValue";
pair[0].Value = "Some Value";