FormatDelegate
Wraps a delegate so that it can be used as a parameter to any string-formatting method (such as Format ). For example: var textWithLink = string.Format("Please click on {0:this link}.", new FormatDelegate((text) => Html.ActionLink(text, "SomeAction"));
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Class
- Namespace: Unity.SmartStrings.Utilities
- Assembly: UnityEngine.SmartStringsModule
- Implements: IFormattable
public class FormatDelegate : IFormattable
Constructors
Constructor | Description |
|---|---|
| FormatDelegate(System.Func{System.String,System.IFormatProvider,System.String}) | Creates a format delegate that wraps a function taking the format string and a format provider. |
| FormatDelegate(System.Func{System.String,System.String}) | Creates a format delegate that wraps a function taking the format string. |