Is there a way to get the index of an int from a list?
Looking for something like list1.FindIndex(5) where I want to find the position of 5 in the list.
Is there a way to get the index of an int from a list?
Looking for something like list1.FindIndex(5) where I want to find the position of 5 in the list.
It's even easier if you consider that the Generic List in C# is indexed from 0 like an array. This means you can just use something like:
int index = 0; int i = accounts[index];