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
In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:
[mcs.git]
/
tests
/
gtest-linq-11.cs
blob
6a87cf13faddd33fd7a42f46743895ed336a755e
1
2
3
using
System
;
4
using
System
.
Collections
.
Generic
;
5
using
System
.
Linq
;
6
7
class
IntoTest
8
{
9
public static int
Main
()
10
{
11
int
[]
int_array
=
new int
[]
{ 0, 1 }
;
12
13
var
e
=
from
i
in
int_array
14
where i
>
0
15
select
i
16
into
x
17
select
x
+
99
;
18
19
var
l
=
e
.
ToList
();
20
21
if
(
l
.
Count
!=
1
)
22
return
1
;
23
24
if
(
l
[
0
] !=
100
)
25
return
2
;
26
27
e
=
from int
i
in
int_array
28
select
i
+
3
29
into
x
30
where x
==
3
31
select
x
+
5
;
32
33
l
=
e
.
ToList
();
34
35
if
(
l
.
Count
!=
1
)
36
return
1
;
37
38
if
(
l
[
0
] !=
8
)
39
return
2
;
40
41
Console
.
WriteLine
(
"OK"
);
42
return
0
;
43
}
44
}