Microsoft.Protocols.TestSuites.Common.Common.FormatString C# (CSharp) Method

FormatString() public static method

Extension of string.Format to use the string as the object to be formatted. When the string argument is null, this extension will treat it as string.Empty
public static FormatString ( string format ) : string
format string A composite format string
return string
        public static string FormatString(string format, params string[] args)
        {
            string[] tmpargs = new string[args.Length];

            for (int i = 0; i < args.Length; i++)
            {
                tmpargs[i] = args[i] ?? string.Empty;
            }

            return string.Format(format, tmpargs);
        }
Common