Possible Duplicate:
Conversion of System.Array to List
I want to convert the aPersonDataArr to a list IList<aPersonDataArr> aPerList = ???
and viceVersa - from list to array. How can this be done, I am not willing to use LINQ. Is there any other way to do it?
class PersonData
{
public string PersonName;
public int Age;
}
class Program
{
static void Main(string[] args)
{
PersonData[] aPersonDataArr = new PersonData[2];
for (int i = 0; i < aPersonDataArr.Length; i++)
{
aPersonDataArr[i].PersonName = "abcd";
aPersonDataArr[i].Age = 10;
}
}
}