Tried with:
listPacchetti[2]
but it doesnt works at all. In fact I should do this code :
IList<SomeObject> listPacchetti = (
from SomeObject myso in SomeObjects
select myso)
.ToList();
int randInd = r.Next(1, listPacchetti.Length);
var temp = listPacchetti[2];
using an IEnumerable.
Any other workaround/further way? Thanks
You can the ElementAt() or ELementAtOrDefault() method.