Browse Source

Use string.format to convert raw value to hex

pull/1328/head
Passive GitHub 6 years ago
parent
commit
f7cab1a97d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/Discord.Net.Core/Entities/Roles/Color.cs

+ 2
- 2
src/Discord.Net.Core/Entities/Roles/Color.cs View File

@@ -204,8 +204,8 @@ namespace Discord
/// A hexadecimal string of the color.
/// </returns>
public override string ToString() =>
$"#{Convert.ToString(RawValue, 16).PadLeft(6, '0')}";
$"#{string.Format("{0:x6}", RawValue)}";
private string DebuggerDisplay =>
$"#{Convert.ToString(RawValue, 16).PadLeft(6, '0')} ({RawValue})";
$"#{String.Format("{0:x6}", RawValue)} ({RawValue})";
}
}

Loading…
Cancel
Save