I have a string "_Users" of the type list, it contains several lines. Each line is composed of an integer and a string separated by virgula (in general it is just a string): ID (only numbers), name (letters and numbers). What I'm trying to do is find out which line the identifier is on. But what is the problem: if I want to find the index of ID 1, the function contains the return of the first line that contains "1", this will get in the way if there is a user with a name, for example: joao123.
int i = _Users.FindIndex (a => a.Contains (UserID.ToString ()));
var data = _Users[i];
chain given = data.Split (& # 39;, & # 39;);
Any way to solve this?