Method ToStringFast
- Namespace
- DSharpPlus.Entities
- Assembly
- DSharpPlus.dll
ToStringFast(DiscordPermission, bool)
Returns the string representation of the DiscordPermission value.
If the attribute is decorated with a [Display]
or [Description]
attribute, then
uses the provided value. Otherwise uses the name of the member, equivalent to
calling ToString()
on value
.
public static string ToStringFast(this DiscordPermission value, bool useMetadataAttributes)
Parameters
value
DiscordPermissionThe value to retrieve the string value for
useMetadataAttributes
boolIf
true
uses the value provided in the[Display]
or[Description]
attribute as the string representation of the member. Iffalse
, always uses the name of the member, the same as ifToString()
was called.
Returns
- string
The string representation of the value
ToStringFast(DiscordPermission)
Returns the string representation of the DiscordPermission value.
Directly equivalent to calling ToString()
on value
.
public static string ToStringFast(this DiscordPermission value)
Parameters
value
DiscordPermissionThe value to retrieve the string value for
Returns
- string
The string representation of the value, the same as that returned by
ToString()