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
Darshan Kshirasagar
NA
22
3k
Object reference not set to an instance of an object
Oct 21 2016 1:58 AM
---------------------------A1.cs------------------------------
public class A1
{
public B1 AA { get; set; }
}
public class B1
{
public C1 BB { get; set; }
}
public class C1
{
public D1 CC { get; set; }
}
public class D1
{
public E1 DD { get; set; }
}
public class E1
{
public string EE { get; set; }
}
--------------------Default.aspx.cs------------------
protected void Page_Load(object sender, EventArgs e)
{
try
{
A1 ObjA = new A1();
ObjA.AA.BB.CC.DD.EE = "";
}
catch (Exception ex)
{
}
}
As Above i have show the code when is try to access ObjA.AA.BB.CC.DD.EE = ""; this line showing error Object reference not set to an instance of an object
Reply
Answers (
2
)
How to merge one DataTable to another DataTable in c#?
Delegates and Events