TomlStringEnumMemberNameAttribute Class

Sets the name TomlStringEnumConverter uses for an enum value.

[AttributeUsage(AttributeTargets.Field, AllowMultiple = false)]
public sealed class TomlStringEnumMemberNameAttribute : TomlAttribute
Inheritance
TomlAttribute TomlStringEnumMemberNameAttribute

Constructors

NameDescription
TomlStringEnumMemberNameAttribute(string)Initializes a new instance of the TomlStringEnumMemberNameAttribute class.

TomlStringEnumMemberNameAttribute(string)

TomlStringEnumMemberNameAttribute.cs

Initializes a new instance of the TomlStringEnumMemberNameAttribute class.

public TomlStringEnumMemberNameAttribute(string name)

Parameters

name string
The name of the enum value.

Exceptions

ArgumentNullException
name is null.
ArgumentException
name is empty.

Properties

NameDescription
NameGets the name of the enum value.

Gets the name of the enum value.

public string Name { get; }

Property value

string