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
namestringThe 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
namestringThe case-sensitive string representation of the enumeration name or underlying value to convert
ignoreCasebooltrueto read value in case insensitive mode;falseto 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
namestringThe case-sensitive string representation of the enumeration name or underlying value to convert
ignoreCasebooltrueto read value in case insensitive mode;falseto read value in case sensitive mode.allowMatchingMetadataAttributeboolIf
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
nameReadOnlySpan<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
nameReadOnlySpan<char>The case-sensitive string representation of the enumeration name or underlying value to convert
ignoreCasebooltrueto read value in case insensitive mode;falseto 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
nameReadOnlySpan<char>The case-sensitive string representation of the enumeration name or underlying value to convert
ignoreCasebooltrueto read value in case insensitive mode;falseto read value in case sensitive mode.allowMatchingMetadataAttributeboolIf
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