Color(character, foreground) Color(foreground, background) Color(character, foreground, background) Format(format, provider, args) IndexOf(value, startIndex, comparisonType) IndexOf(value, startIndex, count, comparisonType) Replace(oldValue, newValue, comparison) Split(separator, count, options)
Legend Class Struct Enum Interface Delegate | Constructor Method Property Event Field |
| Method: ConsoleColoredString ColorSubstring(int, ConsoleColor?, ConsoleColor?)Declarationpublic ConsoleColoredString ColorSubstring(
int index,
ConsoleColor? foreground,
ConsoleColor? background
) Summary
Colors a range of characters beginning at a specified index within the current string in the specified colors. Parametersint | index |
The index at which to start coloring. | ConsoleColor? | foreground |
The foreground color to assign to the characters starting from the character at index, or
null to use the console’s default foreground color. | ConsoleColor? | background |
The background color to assign to the characters starting from the character at index, or
null to use the console’s default background color. |
Returns
The current string but with some of the colors changed. |