This class wraps a delegate, allowing it to be used as a parameter
to any string-formatting method (such as Format(String, Object)).
For example:
var textWithLink = String.Format("Please click on {0:this link}.", new FormatDelegate((text) => Html.ActionLink(text, "SomeAction"));
Inheritance
FormatDelegate
public class FormatDelegate : IFormattable
Constructors
Declaration
public FormatDelegate(Func<string, IFormatProvider, string> getFormat)
Parameters
Declaration
public FormatDelegate(Func<string, string> getFormat)
Parameters
Methods
Implements System.IFormattable
Declaration
public string ToString(string format, IFormatProvider formatProvider)
Parameters
Returns