---------------------------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