projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
2007-10-17 Jonathan Pobst <monkey@jpobst.com>
[mono.git]
/
mcs
/
tests
/
gtest-linq-11.cs
1
// Compiler options: -langversion:linq
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
}