I am new to IEnumerable class, I now have the values showing in the listbox, however I find that when I click 1 item, it works, but then I can not click a second, any ideas please
class Contacts : IEnumerable
{
public List ContactList { get; set; }
class Contact
{
public string Name { get; set; }
public string LocId { get; set; }
public bool IsCompany { get; set; }
}
Contacts list = new Contacts();
public string strRandom;
var a = new Contact() { Name = "Sheffield Shop", LocId="432424", IsCompany=true };
var b = new Contact() { Name = "Manchester", LocId = "1234", IsCompany = true };
var c = new Contact() { Name = "Barnsley", LocId = "12324", IsCompany = true };
list.ContactList = new List<Contact>();
list.ContactList.Add(a);
list.ContactList.Add(b);
list.ContactList.Add(c);