Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions xml/System.ComponentModel/EnumConverter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,8 @@
For more information about type converters, see the <xref:System.ComponentModel.TypeConverter> base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)).

> [!NOTE]
> You should never create an instance of an <xref:System.ComponentModel.EnumConverter>. Instead, call the <xref:System.ComponentModel.TypeDescriptor.GetConverter%2A> method of the <xref:System.ComponentModel.TypeDescriptor> class. For more information, see the examples in the <xref:System.ComponentModel.TypeConverter> base class.



> You should never create an instance of an <xref:System.ComponentModel.EnumConverter>. Instead, call the <xref:System.ComponentModel.TypeDescriptor.GetConverter%2A> method of the <xref:System.ComponentModel.TypeDescriptor> class. For more information, see the examples in the <xref:System.ComponentModel.TypeConverter> base class.

## Examples
The following code example converts a variable of type <xref:System.Enum> to a string, and vice versa. The example requires that you have declared an <xref:System.Enum> called `Servers` and that it has the following members:

Expand Down Expand Up @@ -140,6 +138,8 @@ Windows=1, Exchange=2, BizTalk=3
<param name="type">A <see cref="T:System.Type" /> that represents the type of enumeration to associate with this enumeration converter.</param>
<summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EnumConverter" /> class for the given type.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentException">.NET 9 and later versions: <paramref name="type" /> is not of an enum type.
</exception>
</Docs>
</Member>
<Member MemberName="CanConvertFrom">
Expand Down
43 changes: 34 additions & 9 deletions xml/System.ComponentModel/ICustomTypeDescriptor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,16 @@
</ReturnValue>
<Parameters />
<Docs>
<summary>Gets a type converter for this object that may be registered.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<summary>Returns a type converter for this instance of a component that might be registered.</summary>
<returns>A <see cref="T:System.ComponentModel.TypeConverter" /> that is the converter for this object, or <see langword="null" /> if there is no <see cref="T:System.ComponentModel.TypeConverter" /> for this object.</returns>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
If `null` is returned, use the default <xref:System.ComponentModel.TypeConverter>.

]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="GetDefaultEvent">
Expand Down Expand Up @@ -678,9 +685,18 @@
</ReturnValue>
<Parameters />
<Docs>
<summary>Gets the events for this instance of a component that may be registered.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<summary>Returns the events for this instance of a component that might be registered.</summary>
<returns>An <see cref="T:System.ComponentModel.EventDescriptorCollection" /> that represents the events for this component instance.</returns>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
The events for this instance can differ from the set of events that the class provides. For example, if the component is site-based, the site can add or remove additional events.

Implementors can return <xref:System.ComponentModel.EventDescriptorCollection.Empty?displayProperty=nameWithType> if no properties are specified. This method should never return `null`.

]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="GetProperties">
Expand Down Expand Up @@ -856,9 +872,18 @@
</ReturnValue>
<Parameters />
<Docs>
<summary>Gets the properties for this instance of a component that may be registered.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<summary>Returns the properties for this instance of a component that might be registered.</summary>
<returns>A <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> that represents the properties for this component instance.</returns>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
The properties for this instance can differ from the set of properties that the class provides. For example, if the component is sited, the site can add or remove additional properties.

Implementers can return <xref:System.ComponentModel.PropertyDescriptorCollection.Empty?displayProperty=nameWithType> if no properties are specified. This method should never return `null`.

]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="GetPropertyOwner">
Expand Down