Posted on: 11/23/2014 8:01:49 AM | Views : 399

HI,
I have two list as fallows
public class temp1()
{
   public string EmployeeId { get; set; }    public string CompanyEmployeeId { get; set; }
   public list<temp2> tempnew{ get; set; }
}


public class temp2
{
   public int employeecreated{ get; set; }    public string employeecreateddate{ get; set; }
}

now i am getting data in datareader
and assign data as fallows

public  void assigndata
{
--
--
temp1 tempadd=new temp1();
while (dr.read())
{
tempadd.EmployeeId.=dr["abc"].tostring;
tempadd.CompanyEmployeeId=dr["yz"].tostring;


}
}

now the question is how to add data to list tempnew which is in  temp1 class

Go to the complete details ...