Click or drag to resize

RankedDictionaryTKey, TValueValues Property

Namespace:  Kaos.Collections
Assembly:  KaosCollections (in KaosCollections.dll) Version: 4.2.0.0
Syntax
C#
public RankedDictionaryTKey, TValueValueCollection Values { get; }

Property Value

Type: RankedDictionaryTKey, TValueValueCollection
Remarks
The values given by this collection are sorted in the same order as their respective keys.
Examples
This trivial example shows how to enumerate the values of a dictionary.
C#
using System;
using Kaos.Collections;

namespace ExampleApp
{
    class RdExample02
    {
        static void Main()
        {
            var dary = new RankedDictionary<int,int>()
            { [36] = 360, [12] = 120 };

            Console.WriteLine ("Keys:");
            foreach (var key in dary.Keys)
                Console.WriteLine (key);

            Console.WriteLine ("\nValues:");
            foreach (var val in dary.Values)
                Console.WriteLine (val);
        }

        /* Output:

        Keys:
        12
        36

        Values:
        120
        360

        */
    }
}
See Also