You are on the right track. Use the overload of IndexOf
that takes a start index when you look for the second character:
int first = picture.IndexOf('_');
int second = picture.IndexOf('_', first + 1);
string part = picture.Substring(first + 1, second - first - 1);
solved Get text between 2 same symbols [closed]