diff options
author | Marek Safar <marek.safar@gmail.com> | 2008-03-17 19:30:29 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2008-03-17 19:30:29 +0300 |
commit | b8b77c2633da13a4eeb9c4ab2cc9e146bce84403 (patch) | |
tree | bf94afc68f5a243ec0c9d47e2f2ca3feaafbc473 /mcs/tests/test-617.cs | |
parent | ea3fdb14a5d6a50e554b8b1ebd35b38805e07037 (diff) |
New test.
svn path=/trunk/mcs/; revision=98465
Diffstat (limited to 'mcs/tests/test-617.cs')
-rw-r--r-- | mcs/tests/test-617.cs | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/mcs/tests/test-617.cs b/mcs/tests/test-617.cs new file mode 100644 index 00000000000..dafe515a0a8 --- /dev/null +++ b/mcs/tests/test-617.cs @@ -0,0 +1,42 @@ +using System; +using System.Reflection; + +public delegate long MyDelegate (); + +public interface X +{ + event MyDelegate Foo; + int Prop { get; } +} + +public class Y : X +{ + event MyDelegate X.Foo { + add { + } + + remove { + } + } + + int X.Prop { + get { return 1; } + } + + public event MyDelegate Foo; + + public static int Main () + { + MethodInfo o = typeof (Y).GetMethod ("X.add_Foo", BindingFlags.NonPublic | BindingFlags.Instance); + + if (o == null) + return 1; + + o = typeof (Y).GetMethod ("X.get_Prop", BindingFlags.NonPublic | BindingFlags.Instance); + if (o == null) + return 2; + + Console.WriteLine ("OK"); + return 0; + } +} |