Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

36 lines
572 B
C#

// test-458.cs : for bug #75723
using System;
// The attribute
internal class MyAttr : Attribute {
internal MyAttr() { }
internal MyAttr(Type type) { }
internal MyAttr(string name) { }
internal MyAttr(int i) { }
}
// The Classes
[MyAttr()]
internal class ClassA { }
[MyAttr(typeof(string))]
internal class ClassB { }
[MyAttr("abc")]
internal class ClassC { }
[MyAttr(3)]
internal class ClassD { }
internal class Top
{
public static int Main ()
{
if (typeof (ClassA).GetCustomAttributes (false).Length != 1)
return 1;
return 0;
}
}