Dillinger4
Jul 29th, 2002, 02:48 PM
I want to apply an Attribute to a method which is obsolete. Is this the proper way to do this. I don't have Visual Basic .Net yet so im guessing. Thanks. :p
Public Class Boo
Private String strMentalState
<Obsolete("Scare is obsolete, Use Startle instead")>Public Property Scare() As String
Get
Return strmMentalState
End Get
Set(ByVal strMentalState As String)
Me.strMentalState = strMentalState
End Property
Public Function Startle() As String
End Function
Sub Main()
Dim b Boo = New Boo()
b.Scare("arghhhhh")
End Sub
End Class
Public Class Boo
Private String strMentalState
<Obsolete("Scare is obsolete, Use Startle instead")>Public Property Scare() As String
Get
Return strmMentalState
End Get
Set(ByVal strMentalState As String)
Me.strMentalState = strMentalState
End Property
Public Function Startle() As String
End Function
Sub Main()
Dim b Boo = New Boo()
b.Scare("arghhhhh")
End Sub
End Class