[System] Tweak socket test
[mono-project.git] / mono / tests / array-subtype-attr.cs
bloba629f61774d3cdcd927875e583f0132aae917610
1 using System;
2 using System.Reflection;
4 namespace MonoBug
6 public class Program
8 static private int Main(string[] args)
10 Assembly assembly = Assembly.GetExecutingAssembly ();
11 Type type = assembly.GetType("MonoBug.Program", true);
12 MethodInfo info = type.GetMethod("Foo");
13 object[] attributes = info.GetCustomAttributes (false);
14 int found = 0;
15 foreach (object obj in attributes)
17 Console.WriteLine("Attribute of type {0} found", obj.GetType().ToString());
18 found ++;
20 return found == 1? 0: 1;
23 [My("blah", new string[] { "crash" }, "additional parameter")]
24 public void Foo()
29 [AttributeUsage(AttributeTargets.Method)]
30 class MyAttribute : Attribute
32 public MyAttribute(params object[] arguments)