Table of Contents

Method Parse

Namespace
DSharpPlus.Entities
Assembly
DSharpPlus.dll

Parse(string?)

Converts the string representation of the name or numeric value of an DiscordPermission to the equivalent instance.

public static DiscordPermission Parse(string? name)

Parameters

name string

The case-sensitive string representation of the enumeration name or underlying value to convert

Returns

DiscordPermission

An object of type DiscordPermission whose value is represented by name

Parse(string?, bool)

Converts the string representation of the name or numeric value of an DiscordPermission to the equivalent instance.

public static DiscordPermission Parse(string? name, bool ignoreCase)

Parameters

name string

The case-sensitive string representation of the enumeration name or underlying value to convert

ignoreCase bool

true to read value in case insensitive mode; false to read value in case sensitive mode.

Returns

DiscordPermission

An object of type DiscordPermission whose value is represented by name

Parse(string?, bool, bool)

Converts the string representation of the name or numeric value of an DiscordPermission to the equivalent instance.

public static DiscordPermission Parse(string? name, bool ignoreCase, bool allowMatchingMetadataAttribute)

Parameters

name string

The case-sensitive string representation of the enumeration name or underlying value to convert

ignoreCase bool

true to read value in case insensitive mode; false to read value in case sensitive mode.

allowMatchingMetadataAttribute bool

If true, considers the value included in metadata attributes such as [Display] attribute when parsing, otherwise only considers the member names.

Returns

DiscordPermission

An object of type DiscordPermission whose value is represented by name

Parse(in ReadOnlySpan<char>)

Converts the string representation of the name or numeric value of an DiscordPermission to the equivalent instance.

public static DiscordPermission Parse(in ReadOnlySpan<char> name)

Parameters

name ReadOnlySpan<char>

The case-sensitive string representation of the enumeration name or underlying value to convert

Returns

DiscordPermission

An object of type DiscordPermission whose value is represented by name

Parse(in ReadOnlySpan<char>, bool)

Converts the string representation of the name or numeric value of an DiscordPermission to the equivalent instance.

public static DiscordPermission Parse(in ReadOnlySpan<char> name, bool ignoreCase)

Parameters

name ReadOnlySpan<char>

The case-sensitive string representation of the enumeration name or underlying value to convert

ignoreCase bool

true to read value in case insensitive mode; false to read value in case sensitive mode.

Returns

DiscordPermission

An object of type DiscordPermission whose value is represented by name

Parse(in ReadOnlySpan<char>, bool, bool)

Converts the string representation of the name or numeric value of an DiscordPermission to the equivalent instance.

public static DiscordPermission Parse(in ReadOnlySpan<char> name, bool ignoreCase, bool allowMatchingMetadataAttribute)

Parameters

name ReadOnlySpan<char>

The case-sensitive string representation of the enumeration name or underlying value to convert

ignoreCase bool

true to read value in case insensitive mode; false to read value in case sensitive mode.

allowMatchingMetadataAttribute bool

If true, considers the value included in metadata attributes such as [Display] attribute when parsing, otherwise only considers the member names.

Returns

DiscordPermission

An object of type DiscordPermission whose value is represented by name