I'm working with the class List<T>
, so I came across some search methods, if I may call it that:
Find
; Exists
; Contains
; I was wondering what the difference was between them, so I searched the Microsoft website: List Class , I came to the following conclusion:
Find
: Searches for an element that matches the definitions, and returns the first value in the list. Exists
: Determines whether an element exists that matches the definitions. Contains
: Determines if an element exists that matches ALL definitions. Could you give me a better explanation of the 3 methods? I think it's somebody who confuses the less experienced.