mirror of
https://github.com/LorenzCK/OnTopReplica.git
synced 2024-06-03 11:04:32 +12:00
23 lines
458 B
C#
23 lines
458 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace OnTopReplica {
|
|
|
|
/// <summary>
|
|
/// Poor man's LINQ.
|
|
/// </summary>
|
|
static class EnumerationExtensions {
|
|
|
|
public static bool Contains<T>(IEnumerable<T> collection, T value){
|
|
foreach (var v in collection)
|
|
if (v.Equals(value))
|
|
return true;
|
|
|
|
return false;
|
|
}
|
|
|
|
}
|
|
|
|
}
|