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

◆ ForAll< T >()

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

Definition at line 156 of file Contract.cs.

157 {
158 if (collection == null)
159 {
160 throw new ArgumentNullException("collection");
161 }
162 if (predicate == null)
163 {
164 throw new ArgumentNullException("predicate");
165 }
166 foreach (T item in collection)
167 {
168 if (!predicate(item))
169 {
170 return false;
171 }
172 }
173 return true;
174 }

References System.collection, and System.item.