(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / btests / AttributesD.vb
blobcd680546a0893c40f6a4ca9716e17d6f2a04d92c
1 REM LineNo: 26
2 REM ExpectedError: BC30002
3 REM ErrorMessage: Type 'C2' is not defined.
5 Imports System
7 <AttributeUsage(AttributeTargets.All, AllowMultiple:=True, Inherited:=True)> _
8 Public Class AuthorAttribute
9 Inherits Attribute
10 Public Name
11 Public Sub New(ByVal Name As String)
12 Me.Name=Name
13 End Sub
15 End Class
18 <Author("Robin Cook"),Author("Authur Haily")> _
19 Public Class C1
21 End Class
23 Module Test
24 Sub Main()
26 Dim type As Type=GetType(C2)
27 Dim arr As Object()=type.GetCustomAttributes(GetType(AuthorAttribute),True)
28 If arr.Length=0 Then
29 Console.WriteLine("Interface has no attributes")
30 Else
31 Throw New Exception("AttributesC:Failed-Interfaces should not inherit attributes")
32 End If
33 End Sub
34 End Module