[
AttributeUsage(AttributeTargets.Property, Inherited=true)
]
class DynamicPropertyFilterAttribute : Attribute
{
string
_propertyName;
public
string PropertyName
{
get{return
_propertyName;}
}
string
_showOn;
public
string ShowOn
{
get{return
_showOn;}
}
public
DynamicPropertyFilterAttribute(string propName,
string value)
{
_propertyName=propName;
_showOn=value;
}
}
<AttributeUsage(AttributeTargets.Property,
Inherited:=True)> _
Public
Class DynamicPropertyFilterAttribute
Inherits Attribute
Private _propertyName
As String
Private _showOn As
String
Public ReadOnly
Property PropertyName()
As String
Get
Return
_propertyName
End
Get
End Property
Public ReadOnly
Property ShowOn() As
String
Get
Return
_showOn
End
Get
End Property
Public Sub
New(ByVal
propertyName As String,
ByVal showOn As
String)
_propertyName
= propertyName
_showOn =
showOn
End Sub
End
Class
Use the Back button to return to the article.