blob: aca2001a39e8dce02a16b30489d8f0be32a47d93 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
//
// Tests the various string implicit conversions
//
class XX {
enum X {
A = 1
}
static int Main ()
{
int one = 1;
int two = 2;
if (("a" + "b") != "ab")
return 1;
if (("one" + one) != "one1")
return 2;
if ((one + "one") != "1one")
return 3;
if ((one + "two" + two) != "1two2")
return 4;
if ((X.A + "a") != "Aa")
return 5;
if (((int)X.A) + "a" != "1a")
return 6;
System.Console.WriteLine ("test ok");
return 0;
}
}
|