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.![]()
Code: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


Reply With Quote
