PowerArgs.StringEx.ToConsoleString C# (CSharp) Method

ToConsoleString() public static method

Converts a string to a ConsoleString
public static ToConsoleString ( this s, ConsoleColor fg = null, ConsoleColor bg = null ) : ConsoleString
s this the string to convert
fg ConsoleColor the foreground color to apply to the result
bg ConsoleColor the background color to apply to the result
return ConsoleString
        public static ConsoleString ToConsoleString(this string s, ConsoleColor? fg = null, ConsoleColor? bg = null)
        {
            if (s == null)
            {
                return null;
            }
            else
            {
                return new ConsoleString(s, fg, bg);
            }
        }