Skip to content

Commit 7ee5bf5

Browse files
committed
Added comment.
1 parent 632bb94 commit 7ee5bf5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ReClass.NET/Util/Extension.Linq.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,13 @@ public static bool SequenceEqualsEx<TSource>(this IEnumerable<TSource> first, IE
252252
return counter.Values.All(c => c == 0);
253253
}
254254

255+
/// <summary>
256+
/// Scans the source and returns the first element where the predicate matches.
257+
/// If the predicate doesn't match the first element of the source is returned.
258+
/// </summary>
259+
/// <param name="source"></param>
260+
/// <param name="predicate"></param>
261+
/// <returns></returns>
255262
public static TSource PredicateOrFirst<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)
256263
{
257264
Contract.Requires(source != null);

0 commit comments

Comments
 (0)