I have a List, named values
which contains values similar to the following string values:
GKgpuzjBUh
IS1bbf2ffd806f6d
IS102a8a395ced93
Dark Von Diakonov
IS148159f7c24f78
I need to check if the specific a string in the starts with IS1
I have a List, named values
which contains values similar to the following string values:
GKgpuzjBUh
IS1bbf2ffd806f6d
IS102a8a395ced93
Dark Von Diakonov
IS148159f7c24f78
I need to check if the specific a string in the starts with IS1
Not clear from the question, so here are a few options.
var found = values.Any(item => item.StartsWith("IS1"));
var matches = values.Where(item => item.StartsWith("IS1"));