PowerArgs.StringEx.ToConsoleString C# (CSharp) Méthode

ToConsoleString() public static méthode

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
Résultat 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);
            }
        }