I have an ArrayList of Object (C#).
Each Object has in ID and a Value.
I need to get 1 Random object for Each ID.
Object Class is build in this Way
public class ObjectRandom
{
int32 id { get; set; }
string value { get; set;}
}
For Example This ArrayList has 6000 ObjectRandom.
ID’s COULD be sequential or not.
So if there are 500 Objects For Each User that means there are 12 users. (ID1 , ID2 , ID5 , ID10 , ID11, ID15 ID22 ETC).
I would take from The ArrayList (that’s Got ALL 6000 Objects) only 1 ObjectRandom For Each ID’s.
Does it Possible? I’m trying without any result at the moment.
If you need to use an ArrayList instead of a generic list use: