Olvasás angol nyelven

Megosztás a következőn keresztül:


EnumStringsAttribute Class

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.

Provides information to guide the production of an extension method to efficiently convert an enum value into string form.

C#
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Enum, AllowMultiple=true)]
[System.Diagnostics.Conditional("CODE_GENERATION_ATTRIBUTES")]
public sealed class EnumStringsAttribute : Attribute
Inheritance
EnumStringsAttribute
Attributes

Constructors

EnumStringsAttribute()

Initializes a new instance of the EnumStringsAttribute class.

EnumStringsAttribute(Type)

Initializes a new instance of the EnumStringsAttribute class.

Properties

EnumType

Gets the type of the enum to annotate.

ExtensionClassModifiers

Gets or sets the modifiers to apply to the generated class.

ExtensionClassName

Gets or sets the name of the generated class.

ExtensionMethodName

Gets or sets the name of the generated extension method.

ExtensionNamespace

Gets or sets the namespace of the generated class.

Applies to

Termék Verziók
.NET 6 (package-provided), 7 (package-provided), 8 (package-provided), 9 (package-provided), 10 (package-provided)