checking if a list already contains something

I am currently trying to make a method that checks if a specific int is already existing inside a list, like:

list numbers = new list(); (adding some numbers) ... if (2 already exists in numbers) {do something }

i couldn’t figure it out… any help? is this even possible?

List.Contains to the rescue!



myAwesomeList.Any(p => p == x)