PowerArgs.StringEx.ToConsoleString C# (CSharp) 메소드

ToConsoleString() 공개 정적인 메소드

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
리턴 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);
            }
        }