2005-01-31 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mcs / mbas / Test / errors / AttributesC4.vb
1 REM LineNo: 21
2 REM ExpectedError: BC30662
3 REM ErrorMessage: Attribute 'AuthorAttribute' cannot be applied to 'S1' because the attribute is not valid on this declaration type.
4
5 Imports System
6
7 'Declaring atrribute target to be class and using attribute on methods
8
9 <AttributeUsage(AttributeTargets.Class)> _
10 Public Class AuthorAttribute 
11      Inherits Attribute
12         Public Name
13         Public Sub New(ByVal Name As String)
14                 Me.Name=Name
15         End Sub 
16 End Class
17
18
19 <Author("Robin Cook")> _
20 Public Class C1
21         <Author("John")> _
22         Public Sub S1()
23         End Sub
24
25 End Class
26
27 Module Test
28         Sub Main()
29
30         End Sub
31 End Module