TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Craig Davis
NA
40
0
Accessing object within list
Jul 23 2015 3:07 PM
I have a parent object Z which contains a list of child objects. I would like to access the properties of the child objects within the list.
I wrote code to access the first object in the list. The code compiles correctly but returns a (object reference not set to instance of an object) error when I run the application.
Here is part of the code:
zparentobject= new Zclass();
childclass zchildobject = new childclass();
zchildobject=zparentobject.listz[0]; * source of error*
Help?
Reply
Answers (
2
)
how to get the checkbox selected value from gridview
create treeview with child treenode according to xml file