Method ToStringFast
- Namespace
- DSharpPlus.Entities
- Assembly
- DSharpPlus.dll
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
valueDiscordPermissionThe value to retrieve the string value for
Returns
- string
The string representation of the value, the same as that returned by
ToString()
ToStringFast(DiscordPermission, SerializationOptions)
Returns the string representation of the DiscordPermission value.
Directly equivalent to calling ToString() on value.
public static string ToStringFast(this DiscordPermission value, SerializationOptions options)
Parameters
valueDiscordPermissionThe value to retrieve the string value for
optionsSerializationOptionsThe options to use when serializing the enum
Returns
- string
The string representation of the value, using the provided options.
ToStringFast(DiscordPermission, bool)
Returns the string representation of the DiscordPermission value.
If the member is decorated with the EnumMemberAttribute attribute
then that value is returned. Otherwise returns uses the name of the member,
equivalent to calling ToString() on value.
public static string ToStringFast(this DiscordPermission value, bool useMetadataAttributes)
Parameters
valueDiscordPermissionThe value to retrieve the string value for
useMetadataAttributesboolIf true uses the value provided in the EnumMemberAttribute attribute as the string representation of the member. If false, always uses the name of the member, the same as if
ToString()was called.
Returns
- string
The string representation of the value