Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Exists< T >()

static bool System.Diagnostics.Contracts.Contract.Exists< T > ( IEnumerable< T > collection,
Predicate< T > predicate )
inlinestatic

Definition at line 196 of file Contract.cs.

197 {
198 if (collection == null)
199 {
200 throw new ArgumentNullException("collection");
201 }
202 if (predicate == null)
203 {
204 throw new ArgumentNullException("predicate");
205 }
206 foreach (T item in collection)
207 {
208 if (predicate(item))
209 {
210 return true;
211 }
212 }
213 return false;
214 }

References System.collection, and System.item.