EnumStringsAttribute Constructors
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.
Overloads
EnumStringsAttribute() |
Initializes a new instance of the EnumStringsAttribute class. |
EnumStringsAttribute(Type) |
Initializes a new instance of the EnumStringsAttribute class. |
EnumStringsAttribute()
- Source:
- EnumStringsAttribute.cs
Initializes a new instance of the EnumStringsAttribute class.
public:
EnumStringsAttribute();
public EnumStringsAttribute();
Public Sub New ()
Remarks
Use this overload when directly annotating an enum type.
Applies to
EnumStringsAttribute(Type)
- Source:
- EnumStringsAttribute.cs
Initializes a new instance of the EnumStringsAttribute class.
public:
EnumStringsAttribute(Type ^ enumType);
public EnumStringsAttribute(Type enumType);
new Microsoft.Extensions.EnumStrings.EnumStringsAttribute : Type -> Microsoft.Extensions.EnumStrings.EnumStringsAttribute
Public Sub New (enumType As Type)
Parameters
- enumType
- Type
The type of the enum to work with.
Examples
[assembly: EnumStrings(typeof(System.ConsoleKey))]
Remarks
Use this overload when applying the attribute at the assembly level when working with an enum declared in a different assembly.