Class Tuple | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class Tuple

    Provides static methods for creating tuple objects.

    Tuple implementation for .NET 3.5

    Inheritance
    System.Object
    Tuple
    Namespace: RSG
    Syntax
    public class Tuple

    Methods

    Create<T1, T2>(T1, T2)

    Create a new 2-tuple, or pair.

    Declaration
    public static Tuple<T1, T2> Create<T1, T2>(T1 item1, T2 item2)
    Parameters
    Type Name Description
    T1 item1

    The value of the first component of the tuple.

    T2 item2

    The value of the second component of the tuple.

    Returns
    Type Description
    Tuple<T1, T2>

    A 2-tuple whose value is (item1, item2)

    Type Parameters
    Name Description
    T1

    The type of the first component of the tuple.

    T2

    The type of the second component of the tuple.

    Create<T1, T2, T3>(T1, T2, T3)

    Create a new 3-tuple, or triple.

    Declaration
    public static Tuple<T1, T2, T3> Create<T1, T2, T3>(T1 item1, T2 item2, T3 item3)
    Parameters
    Type Name Description
    T1 item1

    The value of the first component of the tuple.

    T2 item2

    The value of the second component of the tuple.

    T3 item3

    The value of the third component of the tuple.

    Returns
    Type Description
    Tuple<T1, T2, T3>

    A 3-tuple whose value is (item1, item2, item3)

    Type Parameters
    Name Description
    T1

    The type of the first component of the tuple.

    T2

    The type of the second component of the tuple.

    T3

    The type of the third component of the tuple.

    Create<T1, T2, T3, T4>(T1, T2, T3, T4)

    Create a new 4-tuple, or quadruple.

    Declaration
    public static Tuple<T1, T2, T3, T4> Create<T1, T2, T3, T4>(T1 item1, T2 item2, T3 item3, T4 item4)
    Parameters
    Type Name Description
    T1 item1

    The value of the first component of the tuple.

    T2 item2

    The value of the second component of the tuple.

    T3 item3

    The value of the third component of the tuple.

    T4 item4

    The value of the fourth component of the tuple.

    Returns
    Type Description
    Tuple<T1, T2, T3, T4>

    A 3-tuple whose value is (item1, item2, item3, item4)

    Type Parameters
    Name Description
    T1

    The type of the first component of the tuple.

    T2

    The type of the second component of the tuple.

    T3

    The type of the third component of the tuple.

    T4

    The type of the fourth component of the tuple.

    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