lundi 21 avril 2014

Getting values of items in IList?


Vote count:

0




Is there any way to get the values of items in the IList? It goes like this:


Assume we have an IList list and a method private IList getValues(int ID)


then we initiate IList list like:


IList list = getValues(SelectedID)


After the processing, IList list now contains 2 elements, each with it's own collection:



[0]
{
GroupName = "test01"
GroupID = 1
}

[1]
{
GroupName = "test02"
GroupID = 2
}


How will I get the GroupName of the first element? I can't just call it like list[0].GroupName, can I?



asked 32 secs ago

Don

50





Aucun commentaire:

Enregistrer un commentaire