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
Povratne informacije
https://aka.ms/ContentUserFeedback.
Kmalu na voljo: V letu 2024 bomo ukinili storitev Težave v storitvi GitHub kot mehanizem za povratne informacije za vsebino in jo zamenjali z novim sistemom za povratne informacije. Za več informacij si oglejte:Pošlji in prikaži povratne informacije za