❔ What's the easiest way to see if a list contains a certain string?
What's the easiest way to see if a list contains a certain string?
5 Replies
.Contains, assuming the list is a list of strings
would i have to put it through a for loop? or would .Contains by itself work
List<T>
has a Contains(T)
method that returns a bool
You don't need to loopohhh i see, thanks a lot!
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.