2010-02-13 Jb Evain <jbevain@novell.com>
[mcs.git] / tests / test-599.cs
blob034f6d96488ba283e3ab79d94f178c7ad78c0895
1 using System;
3 namespace Test
5 using Text = System.Text;
6 using Str = System.String;
8 public class String
10 string s;
11 public String(string s)
13 this.s=s;
16 public static implicit operator String (string s1)
18 if(s1==null) return null;
19 return new String(s1);
22 public static implicit operator Str (String s1)
24 if(s1==null) return null;
25 return s1.ToString();
30 namespace TestCompiler
32 using String=Test.String;
34 class MainClass
36 public static int Main ()
38 String a = "a";
39 int i=1;
40 a+=i;
41 string s = i + a;
43 Console.WriteLine (s);
44 if (s != "1Test.String")
45 return 1;
47 return 0;