[LoongArch64] Part-5:add loongarch support in some files for LoongArch64. (#21769)
[mono-project.git] / mcs / tests / dtest-error-04.cs
blobcd610bf123ae74ffa87f4150ad8b7a2c4d5476ad
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;