Thanks for the reply TheSteph,
This is how I'm filling the array & assigning it to the Tag property:
// Create & fill array
string[] memberDetails = { familyMember.MemberName,
familyMember.Gender, familyMember.MaritalStatus };
// Assign array to Tag property
nodeMember.Tag = memberDetails;
I have also done the same thing using a struct instead of an array but I get
the same error.
Hope this helps you help me ;)
Thanks for your time on this
Ant
"TheSteph" wrote:
Your StringArray seems to be empty.... or no StringArray are assigned to the
node "tn"...
You should give us the code where you assign the StringArray to the Tag
property....
Steph.
"Ant" <An*@discussions.microsoft.comwrote in message
news:B9**********************************@microsof t.com...
Hi,
I'm using the tag property of the Treenode object to store an string array
containing some values. I can assign it to the Tag but when I try to
retrieve
values from it I get an error: "Object reference not set to object"
This is what i'm doing below:
// retrieve the array from the treenode tag property
memberInfo = (string[])tn.Tag;
// Try to display the first element. Get error here.
Debug.Assert(false,memberInfo[0]);
What is causing this error?
Any ideas are appreciated
Thanks very much in advance
Ant