ExtensionMethod.NET Home of 880 C#, Visual Basic, F# and Javascript extension methods
Formats any value type
public static string Format<T>(this T value, string format) where T : struct { return string.Format(format, value); }
Console.WriteLine(DateTime.Now.Format("It's {0:t}"));
Author: Patrick A. Lorenz
Submitted on: 19 mrt. 2008
Language: C#
Type: System.ValueType
Views: 4070