Struct KeyValue<TKey, TValue> | Collections | 0.15.0-preview.21
docs.unity.cn
    Show / Hide Table of Contents

    Struct KeyValue<TKey, TValue>

    Defines a key/value pair retrieved by enumerator.

    Namespace: Unity.Collections.LowLevel.Unsafe
    Syntax
    public struct KeyValue<TKey, TValue>
        where TKey : struct, IEquatable<TKey> where TValue : struct
    Type Parameters
    Name Description
    TKey

    The type of the keys in the container.

    TValue

    The type of the values in the container.

    Properties

    Key

    Key of key/value pair.

    Declaration
    public TKey Key { get; }
    Property Value
    Type Description
    TKey

    Value

    Value of key/value pair.

    Declaration
    public TValue Value { get; }
    Property Value
    Type Description
    TValue

    Methods

    GetKeyValue(out TKey, out TValue)

    Retrives both key and value.

    Declaration
    public bool GetKeyValue(out TKey key, out TValue value)
    Parameters
    Type Name Description
    TKey key

    Key of key/value pair.

    TValue value

    Value of key/value pair.

    Returns
    Type Description
    Boolean

    Returns true if key/value pair is valid.

    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on Saturday, January 23, 2021