RecommendedAsConfigurableAttribute(Boolean) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the RecommendedAsConfigurableAttribute class.
public:
RecommendedAsConfigurableAttribute(bool recommendedAsConfigurable);
public RecommendedAsConfigurableAttribute (bool recommendedAsConfigurable);
new System.ComponentModel.RecommendedAsConfigurableAttribute : bool -> System.ComponentModel.RecommendedAsConfigurableAttribute
Public Sub New (recommendedAsConfigurable As Boolean)
Parameters
- recommendedAsConfigurable
- Boolean
true
if the property this attribute is bound to can be used as an application setting; otherwise, false
.
Examples
The following example marks a property as usable as an application setting. This code creates a new RecommendedAsConfigurableAttribute, sets its value to RecommendedAsConfigurableAttribute.Yes, and binds it to the property.
public:
[RecommendedAsConfigurable(true)]
property int MyProperty
{
int get()
{
// Insert code here.
return 0;
}
void set( int value )
{
// Insert code here.
}
}
[RecommendedAsConfigurable(true)]
public int MyProperty {
get {
// Insert code here.
return 0;
}
set {
// Insert code here.
}
}
<RecommendedAsConfigurable(True)> _
Public Property MyProperty() As Integer
Get
' Insert code here.
Return 0
End Get
Set
' Insert code here.
End Set
End Property
Applies to
See also
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.