文档

Unity Engine

Unity Engine

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"));
阅读时间1 分钟最后更新于 1 个月前

Definition

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.