Let's say that I have a LinkedList< Client> and each Client object has an ID property. I want to set each client's ID according to their index in the LinkedList.
In Java i used to do it like this
for (Client i : clientList)
{
i.setClientId(clientList.indexOf(i));
}
I can't seem to find an equivalent function of indexOf() in C#