我正在尝试将属性添加到 VB.NET 中的属性,因此我可以稍后检查该属性我不确定我是否以正确的方式进行此操作。有关如何执行此操作以及如何在运行时检查该属性的一些指示会很棒。
Public Class Person
''' <summary>
''' This is forename property
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
<ExcludeFromModifiedComparision(True)>
Public Property Forename = "Mickey"
<ExcludeFromModifiedComparision(False)>
Public Property Surname = "Mouse"
End Class
Public Class ExcludeFromModifiedComparisionAttribute
Inherits Attribute
Public Sub New(ByVal value As Boolean)
' Not sure what to do here?
Throw New NotImplementedException()
End Sub
End Class