Browse Source

Added ToString and DebuggerDisplay

Casting a hex :ok-hand:
tags/1.0-rc
Khionu Terabite GitHub 9 years ago
parent
commit
c72bf0678b
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      src/Discord.Net/Entities/Roles/Color.cs

+ 6
- 1
src/Discord.Net/Entities/Roles/Color.cs View File

@@ -32,6 +32,11 @@
((uint)(r * 255.0f) << 16) |
((uint)(g * 255.0f) << 8) |
(uint)(b * 255.0f);
}
}
public override string ToString() =>
$"#{Convert.ToString(RawValue, 16)}";
private string DebuggerDisplay() =>
$"#{Convert.ToString(RawValue, 16)} ({RawValue})";
}
}

Loading…
Cancel
Save