Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
2
Reply
Object reference not set to an instance of an object
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Darshan Kshirasagar
7y
250
1
Reply
---------------------------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
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
How to merge one DataTable to another DataTable in c#?
Delegates and Events