Merge pull request #1861 from saper/home-override
[mono-project.git] / mcs / tests / dtest-error-04.cs
blobb08555808a2011b40f1a1dbea436fab9e9154e93
1 using System;
2 using Microsoft.CSharp.RuntimeBinder;
4 class A
6 public string Value;
9 public class Test
11 public static int Main ()
13 dynamic d = new A ();
15 try {
16 d.Value = (object)"value";
17 return 1;
18 } catch (RuntimeBinderException e) {
19 if (e.Message != "Cannot implicitly convert type `object' to `string'. An explicit conversion exists (are you missing a cast?)")
20 return 2;
23 return 0;