Address i= Customers.getAddress(2902909);
foreach (Address i1 in i)
{
Console.WriteLine(i1.Pincode);
}
Address i object has all the data stored in it. I am trying to retrieve the data and display it in console.
I am getting error:
Error 1 foreach statement cannot operate on variables of type 'ClassLibrary2.Address' because 'ClassLibrary2.Address' does not contain a public definition for 'GetEnumerator'
I tried changing foreach statment as
foreach (List<Address> i1 in i)
It didn't workout. Please help
Go to the complete details ...