Struct KeyValue<TKey, TValue> | Collections | 0.15.0-preview.21
docs.unity3d.com
    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.

    In This Article
    • Properties
      • Key
      • Value
    • Methods
      • GetKeyValue(out TKey, out TValue)
    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