2010-06-04 Jb Evain <jbevain@novell.com>
[mcs.git] / errors / cs0029-8.cs
blob0a4aeae36c5e6f44511e5bb06a5a03b418227dc8
1 // CS0029: Cannot implicitly convert type `string' to `Test.String'
2 // Line: 38
4 using System;
6 namespace Test
8 using Text = System.Text;
9 using Str = System.String;
11 public class String
13 string s;
14 public String(string s)
16 this.s=s;
19 public static implicit operator Str (String s1)
21 if(s1==null) return null;
22 return s1.ToString();
27 namespace TestCompiler
29 using String=Test.String;
31 class MainClass
33 public static void Main(string[] args)
35 Console.WriteLine("Hello World!");
36 String a="bonjour";
37 int i=1;
38 Console.WriteLine(i+a);