void loginfn(object sender, loginCompletedEventArgs e) { if (e.Result!= null) { List<customer> c = e.Result;//error arises in this line foreach (customer c1 in c) { Guid id=c1.companyrefid; } } else { MessageBox.Show("password not correct "); } }
foreach (customer c1 in e.Result) ...
e.Result
List<customer>
List<ParentOfCustomerClass>
<List<customer> c = (List<customer>)e.Result;
System.Collections.ObjectModel.ObservableCollection<customer> temp = e.Result; foreach (var item in temp) { Guid companyrefid = item.companyrefid; int id = item.id; }
ObservableCollection<customer> temp = new ObservableCollection<customer>(e.Result); foreach (var item in temp) { companyrefid= item.companyrefid; int id = item.id; // MessageBox.Show("id:"+id).ToString(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)