# 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"));

## Definition

* **Type:** Class
* **Namespace:** [Unity.SmartStrings.Utilities](/engine/6000.7/script-reference/unity/smartstrings/utilities.md)
* **Assembly:** UnityEngine.SmartStringsModule
* **Implements:** [IFormattable](https://learn.microsoft.com/dotnet/api/system.iformattable)

```csharp
public class FormatDelegate : IFormattable
```

## Constructors

| Constructor                                                                                                                                                                                                                 | Description                                                                                     |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| [FormatDelegate(System.Func\{System.String,System.IFormatProvider,System.String})](/engine/6000.7/script-reference/unity/smartstrings/utilities/formatdelegate/ctor.md#formatdelegate\(funcstring-iformatprovider-string\)) | Creates a format delegate that wraps a function taking the format string and a format provider. |
| [FormatDelegate(System.Func\{System.String,System.String})](/engine/6000.7/script-reference/unity/smartstrings/utilities/formatdelegate/ctor.md#formatdelegate\(funcstring-string\))                                        | Creates a format delegate that wraps a function taking the format string.                       |
