docs.unity3d.com
    Show / Hide Table of Contents

    Class FormatDelegate

    This class wraps a delegate, allowing it to be used as a parameter to any string-formatting method (such as ). For example:

     var textWithLink = String.Format("Please click on {0:this link}.", new FormatDelegate((text) => Html.ActionLink(text, "SomeAction"));
    Inheritance
    Object
    FormatDelegate
    Namespace: UnityEngine.Localization.SmartFormat.Utilities
    Syntax
    public class FormatDelegate : IFormattable

    Constructors

    FormatDelegate(Func<String, IFormatProvider, String>)

    Declaration
    public FormatDelegate(Func<string, IFormatProvider, string> getFormat)
    Parameters
    Type Name Description
    Func<String, IFormatProvider, String> getFormat

    FormatDelegate(Func<String, String>)

    Declaration
    public FormatDelegate(Func<string, string> getFormat)
    Parameters
    Type Name Description
    Func<String, String> getFormat

    Methods

    ToString(String, IFormatProvider)

    Implements System.IFormattable

    Declaration
    public string ToString(string format, IFormatProvider formatProvider)
    Parameters
    Type Name Description
    String format
    IFormatProvider formatProvider
    Returns
    Type Description
    String

    Extension Methods

    TupleExtensions.IsValueTuple(Object)
    TupleExtensions.GetValueTupleItemObjects(Object)
    TupleExtensions.GetValueTupleItemObjectsFlattened(Object)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023