repo.or.cz
/
IEnumerableExtras.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Adding C# solution.
[IEnumerableExtras.git]
/
C#
/
EnumerableIn.cs
blob
32c79a0c2a2097042fe1a62d41d477a3bcbb2e68
1
using
System
.
Collections
.
Generic
;
2
using
System
.
Linq
;
3
4
namespace
IEnumerableExtras
5
{
6
public static class
EnumerableIn
7
{
8
public static bool
In
<
T
>(
this
T needle
,
IEnumerable
<
T
>
heystack
)
9
{
10
return
heystack
.
Contains
(
needle
);
11
}
12
}
13
}