Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2004-05-14 14:37:41 +0400
committerMarek Safar <marek.safar@gmail.com>2004-05-14 14:37:41 +0400
commit29e67c28b31f18ec3b41cc796c2703375a52c629 (patch)
treed405c93b755d91adc4b7fee7535b8364b1c2fdbb /mcs/tests/test-253.cs
parentdfdbca7223e5f4385cb2fdd1dc26908dcb5c8cc6 (diff)
2004-05-14 Marek Safar <marek.safar@seznam.cz>
* cs3008-7.cs: New test for bug #58478. svn path=/trunk/mcs/; revision=27370
Diffstat (limited to 'mcs/tests/test-253.cs')
-rw-r--r--mcs/tests/test-253.cs32
1 files changed, 32 insertions, 0 deletions
diff --git a/mcs/tests/test-253.cs b/mcs/tests/test-253.cs
new file mode 100644
index 00000000000..d4f0096b9ba
--- /dev/null
+++ b/mcs/tests/test-253.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Reflection;
+
+[AttributeUsage(AttributeTargets.Field)]
+public class AccessibleAttribute:Attribute {}
+
+public class MyClass
+{
+ [Accessible]
+ public const int MyConst = 1;
+}
+
+
+public class Test
+{
+ public static int Main()
+ {
+ FieldInfo fieldInfo = typeof(MyClass).GetField("MyConst",
+ BindingFlags.Static | BindingFlags.Public);
+
+ AccessibleAttribute[] attributes =
+ fieldInfo.GetCustomAttributes(
+ typeof(AccessibleAttribute), true) as AccessibleAttribute[];
+
+ if (attributes != null)
+ {
+ Console.WriteLine ("Succeeded");
+ return 0;
+ }
+ return 1;
+ }
+} \ No newline at end of file