Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ArgumentException #10500

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still true?


## 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