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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
AlanPosted Oct 12, 2007, 5:40 PM
You're missing a step:
NameValue[] pair = new NameValue[1];
pair[0] = new NameValue();
pair[0].Name = "SomeValue";
pair[0].Value = "Some Value";