PASTEBIN
| #1 paste tool since 2002
create new paste
tools
api
archive
faq
PASTEBIN
create new paste
trending pastes
sign up
login
my alerts
my settings
my profile
Don't like ads?
PRO users
don't see any ads ;-)
Public Pastes
Untitled
5 sec ago
Untitled
5 sec ago
Untitled
9 sec ago
Untitled
5 sec ago
Untitled
8 sec ago
Untitled
15 sec ago
Untitled
21 sec ago
Untitled
30 sec ago
George Mauer
By: a guest on
Aug 26th, 2009
| syntax:
C#
| size: 0.14 KB | hits: 462 | expires: Never
download
|
raw
|
embed
|
report abuse
|
print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
var
do
=
new
Dictionary
<
Func
<
int
,
bool
>
, Action
<
int
>>
=
{
{
x
=>
x
<
5, x
=>
x
=
0
}
{
_
=>
true
, print
(
x
)
}
}
int
someVal
=
5
;
do
.
First
(
kv
=>
k
(
someVal
)
)
;
create a
new version
of this paste
RAW Paste Data
var do = new Dictionary<Func<int, bool>, Action<int>> = { {x=>x<5, x=>x=0} {_=>true, print(x)} } int someVal = 5; do.First(kv=>k(someVal));