(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / btests / AttributesC2.vb
blobf59c7dda88d7d6580982af218d16141edd7cf6aa
1 REM LineNo: 19
2 REM ExpectedError: BC32035
3 REM ErrorMessage: Attribute specifier is not a complete statement. Use a line continuation to apply the attribute to the following statement.
5 Imports System
7 <AttributeUsage(AttributeTargets.All)> _
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
14 End Class
17 <Author("Robin Cook")> _
18 Public Class C1
19 <Author("John")> _
21 End Class
23 Module Test
24 Sub Main()
26 Dim type As Type=GetType(C1)
27 Dim arr As Object()=type.GetCustomAttributes(GetType(AuthorAttribute),True)
28 If arr.Length=0 Then
29 Console.WriteLine("Class has no attributes")
30 Else
31 Dim aa As AuthorAttribute=CType(arr(0),AuthorAttribute)
32 Console.WriteLine("Name:" & aa.Name)
33 End If
34 End Sub
35 End Module