repo.or.cz
/
mcs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2010-06-21 Atsushi Enomoto <atsushi@ximian.com>
[mcs.git]
/
tests
/
gtest-exmethod-10.cs
blob
be075dd34297c320a17841969e637c063bf23d3f
1
2
3
using
System
;
4
5
static class
AExtensions
6
{
7
public static int
Round
(
this double
d
)
8
{
9
return
(
int
)
Math
.
Round
(
d
);
10
}
11
}
12
13
static class
BExtensions
14
{
15
public static
T GetBy
<
T
> (
this
T
[]
a
,
double
p
)
16
{
17
return
a
[
p
.
Round
()];
18
}
19
}
20
21
public class
C
22
{
23
public static void
Main
()
24
{
25
}
26
}