[interp] Remove unreachable code (#12411)
[mono-project.git] / mono / tests / delegate10.cs
blob86f988d99b91c51bba5b61a7a04c949a6b00c5d5
1 using System;
2 using System.Reflection;
4 public class Tests
6 public struct Test {
7 public string MyProp {get; set;}
10 delegate string GetterDelegate (ref Test arg);
12 public static int Main (String[] args) {
13 var m = typeof (Tests.Test).GetProperty ("MyProp").GetMethod;
15 var d = (GetterDelegate)m.CreateDelegate (typeof (GetterDelegate));
17 var s = new Test () { MyProp = "A" };
18 if (d (ref s) == "A")
19 return 0;
20 else
21 return 1;