Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
436 lines (405 sloc) 28.6 KB
<Type Name="RecommendedAsConfigurableAttribute" FullName="System.ComponentModel.RecommendedAsConfigurableAttribute">
<TypeSignature Language="C#" Value="public class RecommendedAsConfigurableAttribute : Attribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit RecommendedAsConfigurableAttribute extends System.Attribute" />
<TypeSignature Language="DocId" Value="T:System.ComponentModel.RecommendedAsConfigurableAttribute" />
<TypeSignature Language="VB.NET" Value="Public Class RecommendedAsConfigurableAttribute&#xA;Inherits Attribute" />
<TypeSignature Language="C++ CLI" Value="public ref class RecommendedAsConfigurableAttribute : Attribute" />
<TypeSignature Language="F#" Value="type RecommendedAsConfigurableAttribute = class&#xA; inherit Attribute" />
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Attribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="netcore-2.0;netcore-2.1;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netframework-4.8;netcore-2.2;netcore-3.0;netstandard-2.1">
<AttributeName>System.AttributeUsage(System.AttributeTargets.Property)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netcore-2.0;netcore-2.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netframework-4.8;netcore-2.2;netcore-3.0;netstandard-2.1">
<AttributeName>System.Obsolete("Use System.ComponentModel.SettingsBindableAttribute instead to work with the new settings model.")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Specifies that the property can be used as an application setting.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Properties that are marked with the <xref:System.ComponentModel.RecommendedAsConfigurableAttribute> set to `true` display when you expand the **ConfigurableProperties** line in the **Properties** window. A property that has no recommended setting or that is marked with <xref:System.ComponentModel.RecommendedAsConfigurableAttribute> set to `false` is not shown and is an unlikely candidate for being an application setting. The default is `false`.
You can bind a property that does not have a <xref:System.ComponentModel.RecommendedAsConfigurableAttribute> to a setting in Visual Studio by clicking the ellipsis button (…) under **Settings** in the **Properties** window and selecting the appropriate property from the list.
> [!NOTE]
> When you mark a property with <xref:System.ComponentModel.RecommendedAsConfigurableAttribute> set to `true`, the value of this attribute is set to the constant member <xref:System.ComponentModel.RecommendedAsConfigurableAttribute.Yes>. For a property marked with <xref:System.ComponentModel.RecommendedAsConfigurableAttribute> set to value `false`, the value is <xref:System.ComponentModel.RecommendedAsConfigurableAttribute.No>. Therefore, when you want to check the value of this attribute in your code, you must specify the attribute as <xref:System.ComponentModel.RecommendedAsConfigurableAttribute.Yes?displayProperty=nameWithType> or <xref:System.ComponentModel.RecommendedAsConfigurableAttribute.No?displayProperty=nameWithType>.
For more information, see [Attributes](~/docs/standard/attributes/index.md).
.
## Examples
The following example marks a property as usable as an application setting.
[!code-cpp[Classic RecommendedAsConfigurableAttribute Example#1](~/samples/snippets/cpp/VS_Snippets_Winforms/Classic RecommendedAsConfigurableAttribute Example/CPP/source.cpp#1)]
[!code-csharp[Classic RecommendedAsConfigurableAttribute Example#1](~/samples/snippets/csharp/VS_Snippets_Winforms/Classic RecommendedAsConfigurableAttribute Example/CS/source.cs#1)]
[!code-vb[Classic RecommendedAsConfigurableAttribute Example#1](~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic RecommendedAsConfigurableAttribute Example/VB/source.vb#1)]
The next example shows how to check the value of the <xref:System.ComponentModel.RecommendedAsConfigurableAttribute> for `MyProperty`. First the code gets a <xref:System.ComponentModel.PropertyDescriptorCollection> with all the properties for the object. Next it indexes into the <xref:System.ComponentModel.PropertyDescriptorCollection> to get `MyProperty`. Then it returns the attributes for this property and saves them in the attributes variable.
This example presents two different ways of checking the value of the <xref:System.ComponentModel.RecommendedAsConfigurableAttribute>. In the second code fragment, the example calls the <xref:System.ComponentModel.RecommendedAsConfigurableAttribute.Equals%2A> method. In the last code fragment, the example uses the <xref:System.ComponentModel.RecommendedAsConfigurableAttribute.RecommendedAsConfigurable%2A> property to check the value.
[!code-cpp[Classic RecommendedAsConfigurableAttribute Example#2](~/samples/snippets/cpp/VS_Snippets_Winforms/Classic RecommendedAsConfigurableAttribute Example/CPP/source.cpp#2)]
[!code-csharp[Classic RecommendedAsConfigurableAttribute Example#2](~/samples/snippets/csharp/VS_Snippets_Winforms/Classic RecommendedAsConfigurableAttribute Example/CS/source.cs#2)]
[!code-vb[Classic RecommendedAsConfigurableAttribute Example#2](~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic RecommendedAsConfigurableAttribute Example/VB/source.vb#2)]
If you marked a class with the <xref:System.ComponentModel.RecommendedAsConfigurableAttribute>, use the following code to check the value.
[!code-cpp[Classic RecommendedAsConfigurableAttribute Example#3](~/samples/snippets/cpp/VS_Snippets_Winforms/Classic RecommendedAsConfigurableAttribute Example/CPP/source.cpp#3)]
[!code-csharp[Classic RecommendedAsConfigurableAttribute Example#3](~/samples/snippets/csharp/VS_Snippets_Winforms/Classic RecommendedAsConfigurableAttribute Example/CS/source.cs#3)]
[!code-vb[Classic RecommendedAsConfigurableAttribute Example#3](~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic RecommendedAsConfigurableAttribute Example/VB/source.vb#3)]
]]></format>
</remarks>
<altmember cref="T:System.Attribute" />
<altmember cref="T:System.ComponentModel.PropertyDescriptor" />
<altmember cref="T:System.ComponentModel.AttributeCollection" />
<altmember cref="T:System.ComponentModel.PropertyDescriptorCollection" />
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public RecommendedAsConfigurableAttribute (bool recommendedAsConfigurable);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(bool recommendedAsConfigurable) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.RecommendedAsConfigurableAttribute.#ctor(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (recommendedAsConfigurable As Boolean)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; RecommendedAsConfigurableAttribute(bool recommendedAsConfigurable);" />
<MemberSignature Language="F#" Value="new System.ComponentModel.RecommendedAsConfigurableAttribute : bool -&gt; System.ComponentModel.RecommendedAsConfigurableAttribute" Usage="new System.ComponentModel.RecommendedAsConfigurableAttribute recommendedAsConfigurable" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="recommendedAsConfigurable" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="recommendedAsConfigurable">
<see langword="true" /> if the property this attribute is bound to can be used as an application setting; otherwise, <see langword="false" />.</param>
<summary>Initializes a new instance of the <see cref="T:System.ComponentModel.RecommendedAsConfigurableAttribute" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example marks a property as usable as an application setting. This code creates a new <xref:System.ComponentModel.RecommendedAsConfigurableAttribute>, sets its value to <xref:System.ComponentModel.RecommendedAsConfigurableAttribute.Yes?displayProperty=nameWithType>, and binds it to the property.
[!code-cpp[Classic RecommendedAsConfigurableAttribute.RecommendedAsConfigurableAttribute Example#1](~/samples/snippets/cpp/VS_Snippets_Winforms/Classic RecommendedAsConfigurableAttribute.RecommendedAsConfigurableAttribute Example/CPP/source.cpp#1)]
[!code-csharp[Classic RecommendedAsConfigurableAttribute.RecommendedAsConfigurableAttribute Example#1](~/samples/snippets/csharp/VS_Snippets_Winforms/Classic RecommendedAsConfigurableAttribute.RecommendedAsConfigurableAttribute Example/CS/source.cs#1)]
[!code-vb[Classic RecommendedAsConfigurableAttribute.RecommendedAsConfigurableAttribute Example#1](~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic RecommendedAsConfigurableAttribute.RecommendedAsConfigurableAttribute Example/VB/source.vb#1)]
]]></format>
</remarks>
<altmember cref="T:System.ComponentModel.RecommendedAsConfigurableAttribute" />
</Docs>
</Member>
<Member MemberName="Default">
<MemberSignature Language="C#" Value="public static readonly System.ComponentModel.RecommendedAsConfigurableAttribute Default;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.ComponentModel.RecommendedAsConfigurableAttribute Default" />
<MemberSignature Language="DocId" Value="F:System.ComponentModel.RecommendedAsConfigurableAttribute.Default" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly Default As RecommendedAsConfigurableAttribute " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::ComponentModel::RecommendedAsConfigurableAttribute ^ Default;" />
<MemberSignature Language="F#" Value=" staticval mutable Default : System.ComponentModel.RecommendedAsConfigurableAttribute" Usage="System.ComponentModel.RecommendedAsConfigurableAttribute.Default" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ComponentModel.RecommendedAsConfigurableAttribute</ReturnType>
</ReturnValue>
<Docs>
<summary>Specifies the default value for the <see cref="T:System.ComponentModel.RecommendedAsConfigurableAttribute" />, which is <see cref="F:System.ComponentModel.RecommendedAsConfigurableAttribute.No" />. This <see langword="static" /> field is read-only.</summary>
<remarks>To be added.</remarks>
<altmember cref="T:System.ComponentModel.RecommendedAsConfigurableAttribute" />
<altmember cref="F:System.ComponentModel.RecommendedAsConfigurableAttribute.Yes" />
<altmember cref="F:System.ComponentModel.RecommendedAsConfigurableAttribute.No" />
</Docs>
</Member>
<Member MemberName="Equals">
<MemberSignature Language="C#" Value="public override bool Equals (object obj);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool Equals(object obj) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.RecommendedAsConfigurableAttribute.Equals(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function Equals (obj As Object) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override bool Equals(System::Object ^ obj);" />
<MemberSignature Language="F#" Value="override this.Equals : obj -&gt; bool" Usage="recommendedAsConfigurableAttribute.Equals obj" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="obj" Type="System.Object" />
</Parameters>
<Docs>
<param name="obj">Another object to compare to.</param>
<summary>Indicates whether this instance and a specified object are equal.</summary>
<returns>
<see langword="true" /> if <paramref name="obj" /> is equal to this instance; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetHashCode">
<MemberSignature Language="C#" Value="public override int GetHashCode ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetHashCode() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.RecommendedAsConfigurableAttribute.GetHashCode" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function GetHashCode () As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override int GetHashCode();" />
<MemberSignature Language="F#" Value="override this.GetHashCode : unit -&gt; int" Usage="recommendedAsConfigurableAttribute.GetHashCode " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns the hash code for this instance.</summary>
<returns>A hash code for the current <see cref="T:System.ComponentModel.RecommendedAsConfigurableAttribute" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IsDefaultAttribute">
<MemberSignature Language="C#" Value="public override bool IsDefaultAttribute ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool IsDefaultAttribute() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.RecommendedAsConfigurableAttribute.IsDefaultAttribute" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function IsDefaultAttribute () As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override bool IsDefaultAttribute();" />
<MemberSignature Language="F#" Value="override this.IsDefaultAttribute : unit -&gt; bool" Usage="recommendedAsConfigurableAttribute.IsDefaultAttribute " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Indicates whether the value of this instance is the default value for the class.</summary>
<returns>
<see langword="true" /> if this instance is the default attribute for the class; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="No">
<MemberSignature Language="C#" Value="public static readonly System.ComponentModel.RecommendedAsConfigurableAttribute No;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.ComponentModel.RecommendedAsConfigurableAttribute No" />
<MemberSignature Language="DocId" Value="F:System.ComponentModel.RecommendedAsConfigurableAttribute.No" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly No As RecommendedAsConfigurableAttribute " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::ComponentModel::RecommendedAsConfigurableAttribute ^ No;" />
<MemberSignature Language="F#" Value=" staticval mutable No : System.ComponentModel.RecommendedAsConfigurableAttribute" Usage="System.ComponentModel.RecommendedAsConfigurableAttribute.No" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ComponentModel.RecommendedAsConfigurableAttribute</ReturnType>
</ReturnValue>
<Docs>
<summary>Specifies that a property cannot be used as an application setting. This <see langword="static" /> field is read-only.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This field is the default setting for this attribute.
When you mark a property with <xref:System.ComponentModel.RecommendedAsConfigurableAttribute> set to `false`, the value of this attribute is set to the constant member <xref:System.ComponentModel.RecommendedAsConfigurableAttribute.No>. Therefore, when you want to check whether the attribute is set to this value in your code, you must specify the attribute <xref:System.ComponentModel.RecommendedAsConfigurableAttribute.No?displayProperty=nameWithType>.
]]></format>
</remarks>
<altmember cref="T:System.ComponentModel.RecommendedAsConfigurableAttribute" />
<altmember cref="F:System.ComponentModel.RecommendedAsConfigurableAttribute.Yes" />
</Docs>
</Member>
<Member MemberName="RecommendedAsConfigurable">
<MemberSignature Language="C#" Value="public bool RecommendedAsConfigurable { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool RecommendedAsConfigurable" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.RecommendedAsConfigurableAttribute.RecommendedAsConfigurable" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property RecommendedAsConfigurable As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool RecommendedAsConfigurable { bool get(); };" />
<MemberSignature Language="F#" Value="member this.RecommendedAsConfigurable : bool" Usage="System.ComponentModel.RecommendedAsConfigurableAttribute.RecommendedAsConfigurable" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the property this attribute is bound to can be used as an application setting.</summary>
<value>
<see langword="true" /> if the property this attribute is bound to can be used as an application setting; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example checks to see whether `MyProperty` is bindable. First the code gets the attributes for `MyProperty` by:
- Retrieving a <xref:System.ComponentModel.PropertyDescriptorCollection> with all the properties for the object.
- Indexing into the <xref:System.ComponentModel.PropertyDescriptorCollection> to get `MyProperty`.
- Saving the attributes for this property in the attributes variable.
Then the code sets `myAttribute` to the value of the <xref:System.ComponentModel.RecommendedAsConfigurableAttribute> in the <xref:System.ComponentModel.AttributeCollection> and checks whether the property is bindable.
[!code-cpp[Classic RecommendedAsConfigurableAttribute.RecommendedAsConfigurable Example#1](~/samples/snippets/cpp/VS_Snippets_Winforms/Classic RecommendedAsConfigurableAttribute.RecommendedAsConfigurable Example/CPP/source.cpp#1)]
[!code-csharp[Classic RecommendedAsConfigurableAttribute.RecommendedAsConfigurable Example#1](~/samples/snippets/csharp/VS_Snippets_Winforms/Classic RecommendedAsConfigurableAttribute.RecommendedAsConfigurable Example/CS/source.cs#1)]
[!code-vb[Classic RecommendedAsConfigurableAttribute.RecommendedAsConfigurable Example#1](~/samples/snippets/visualbasic/VS_Snippets_Winforms/Classic RecommendedAsConfigurableAttribute.RecommendedAsConfigurable Example/VB/source.vb#1)]
]]></format>
</remarks>
<altmember cref="T:System.ComponentModel.RecommendedAsConfigurableAttribute" />
<altmember cref="T:System.Attribute" />
<altmember cref="T:System.ComponentModel.PropertyDescriptor" />
<altmember cref="T:System.ComponentModel.AttributeCollection" />
<altmember cref="T:System.ComponentModel.PropertyDescriptorCollection" />
</Docs>
</Member>
<Member MemberName="Yes">
<MemberSignature Language="C#" Value="public static readonly System.ComponentModel.RecommendedAsConfigurableAttribute Yes;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly class System.ComponentModel.RecommendedAsConfigurableAttribute Yes" />
<MemberSignature Language="DocId" Value="F:System.ComponentModel.RecommendedAsConfigurableAttribute.Yes" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly Yes As RecommendedAsConfigurableAttribute " />
<MemberSignature Language="C++ CLI" Value="public: static initonly System::ComponentModel::RecommendedAsConfigurableAttribute ^ Yes;" />
<MemberSignature Language="F#" Value=" staticval mutable Yes : System.ComponentModel.RecommendedAsConfigurableAttribute" Usage="System.ComponentModel.RecommendedAsConfigurableAttribute.Yes" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ComponentModel.RecommendedAsConfigurableAttribute</ReturnType>
</ReturnValue>
<Docs>
<summary>Specifies that a property can be used as an application setting. This <see langword="static" /> field is read-only.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When you mark a property with <xref:System.ComponentModel.RecommendedAsConfigurableAttribute> set to `true`, the value of this attribute is set to the constant member <xref:System.ComponentModel.RecommendedAsConfigurableAttribute.Yes>.
Therefore, when you want to check whether the attribute is set to this value in your code, you must specify the attribute as <xref:System.ComponentModel.RecommendedAsConfigurableAttribute.Yes?displayProperty=nameWithType>.
]]></format>
</remarks>
<altmember cref="T:System.ComponentModel.RecommendedAsConfigurableAttribute" />
<altmember cref="F:System.ComponentModel.RecommendedAsConfigurableAttribute.No" />
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.