ExtensionMethod.NET Home of 820 C#, Visual Basic, F# and Javascript extension methods

ToStringFormat

StringFormat Extension Style

Source

public static string ToStringFormat(this string stringFormat, params string[] stringParams)
{
    return string.Format(stringFormat, stringParams);
}

Example

Console.WriteLine("{0} {1}".ToStringFormat("Parameter 1", "Parameter 2"));

Console.WriteLine("\nPress [Enter] key to exit.");
while (Console.ReadKey(true).Key != ConsoleKey.Enter) { }

Author: Mehran KeyArash

Submitted on: 27 mrt 2013

Language: C#

Type: String

Views: 4020