add ISafeSerializationData
[mcs.git] / tests / test-178.cs
blob482429a4646f1338a241a777a57f98a23bee5359
1 //
2 // This test ensures that we emit attributes for operators
3 // only once.
4 //
6 using System.ComponentModel;
7 using System.Reflection;
9 public class BrowsableClass
11 [EditorBrowsable(EditorBrowsableState.Always)]
12 public static BrowsableClass operator ++(BrowsableClass a)
14 return null;
17 public static int Main ()
19 BrowsableClass c = new BrowsableClass ();
20 MethodInfo mi = c.GetType().GetMethod ("op_Increment");
22 object[] attributes = mi.GetCustomAttributes
23 (typeof(EditorBrowsableAttribute), false);
25 if (attributes.Length != 1)
26 return 1;
28 return 0;