[ilasm] Don't break arguments compatiblity
[mono-project.git] / mcs / tests / test-860.cs
bloba87e624db781f0607ec9651fde7fcac6fbe215ac
1 using System;
2 using System.Reflection;
3 using System.Diagnostics;
5 namespace ConditionalAttributeTesting
7 class MainClass
9 public static int Main ()
11 return HelloWorld ();
14 [Some ("Test")]
15 public static int HelloWorld ()
17 var methodInfo = MethodBase.GetCurrentMethod ();
18 SomeAttribute someAttribute = Attribute.GetCustomAttribute (methodInfo, typeof (SomeAttribute)) as SomeAttribute;
19 if (someAttribute != null) {
20 return 1;
23 return 0;
27 [AttributeUsage (AttributeTargets.All)]
28 [Conditional ("NOT_DEFINED")]
29 public sealed class SomeAttribute : Attribute
31 public SomeAttribute (string someText)