**** Merged from MCS ****
[mono-project.git] / mcs / btests / AttributesC5.vb
blob4099981b624d6cd1d91ceab63945c321c193e3d0
1 REM LineNo: 22
2 REM ExpectedError: BC30663
3 REM ErrorMessage: Attribute 'AuthorAttribute' cannot be applied multiple times.
5 Imports System
6 'Using a single-use attribute multiple times
7 <AttributeUsage(AttributeTargets.Class, AllowMultiple:=False)> _
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 Public ReadOnly Property NameP() As String
15 Get
16 Return Name
17 End Get
18 End Property
19 End Class
22 <Author("Robin Cook"),Author("John Gresham")> _
23 Public Class C1
25 Public Sub S1()
26 End Sub
28 End Class
30 Module Test
31 Sub Main()
33 End Sub
34 End Module