[corlib] Add a special method for XI so the linker does not always have to generate it.
[mono-project.git] / mcs / tests / dtest-error-03.cs
blobdea56ec61efc0932d51eec86219ad44962a3a50d
1 using System;
2 using Microsoft.CSharp.RuntimeBinder;
3 using System.Dynamic;
4 using System.Runtime.CompilerServices;
6 public class C
10 public class Test
12 public static int Main ()
14 var getter = CallSite<Func<CallSite, object, object>>.Create (
15 Binder.GetMember (
16 CSharpBinderFlags.None, "n", null, new[] {
17 CSharpArgumentInfo.Create (CSharpArgumentInfoFlags.None, null) }));
19 try {
20 getter.Target (getter, new C ());
21 } catch (RuntimeBinderException e) {
22 if (e.Message == "`C' does not contain a definition for `n'")
23 return 0;
25 return 2;
28 return 1;