Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SortedList<TKey, TValue>

    Show / Hide Table of Contents

    Class SortedList<TKey, TValue>

    Represents a collection of associated keys and values that are sorted by the keys and are accessible by key and by index.

    Inheritance
    System.Object
    SortedList<TKey, TValue>
    Implements
    System.Collections.Generic.IDictionary<TKey, TValue>
    System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>
    System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>>
    System.Collections.IEnumerable
    System.Collections.IDictionary
    System.Collections.ICollection
    Namespace: System.Collections.Generic
    Assembly: Syncfusion.XlsIO.Portable.dll
    Syntax
    public class SortedList<TKey, TValue> : Object, IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable, IDictionary, ICollection
    Type Parameters
    Name Description
    TKey
    TValue

    Constructors

    SortedList()

    Declaration
    public SortedList()

    SortedList(IComparer<TKey>)

    Declaration
    public SortedList(IComparer<TKey> comparer)
    Parameters
    Type Name Description
    System.Collections.Generic.IComparer<TKey> comparer

    SortedList(IDictionary<TKey, TValue>)

    Declaration
    public SortedList(IDictionary<TKey, TValue> dictionary)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue> dictionary

    SortedList(IDictionary<TKey, TValue>, IComparer<TKey>)

    Declaration
    public SortedList(IDictionary<TKey, TValue> dictionary, IComparer<TKey> comparer)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<TKey, TValue> dictionary
    System.Collections.Generic.IComparer<TKey> comparer

    SortedList(Int32)

    Declaration
    public SortedList(int capacity)
    Parameters
    Type Name Description
    System.Int32 capacity

    SortedList(Int32, IComparer<TKey>)

    Declaration
    public SortedList(int capacity, IComparer<TKey> comparer)
    Parameters
    Type Name Description
    System.Int32 capacity
    System.Collections.Generic.IComparer<TKey> comparer

    Properties

    Capacity

    Declaration
    public int Capacity { get; set; }
    Property Value
    Type Description
    System.Int32

    Comparer

    Declaration
    public IComparer<TKey> Comparer { get; }
    Property Value
    Type Description
    System.Collections.Generic.IComparer<TKey>

    Count

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    System.Int32

    Item[TKey]

    Declaration
    public TValue this[TKey key] { get; set; }
    Parameters
    Type Name Description
    TKey key
    Property Value
    Type Description
    TValue

    Keys

    Declaration
    public IList<TKey> Keys { get; }
    Property Value
    Type Description
    System.Collections.Generic.IList<TKey>

    Values

    Declaration
    public IList<TValue> Values { get; }
    Property Value
    Type Description
    System.Collections.Generic.IList<TValue>

    Methods

    Add(TKey, TValue)

    Declaration
    public void Add(TKey key, TValue value)
    Parameters
    Type Name Description
    TKey key
    TValue value

    Clear()

    Declaration
    public void Clear()

    ContainsKey(TKey)

    Declaration
    public bool ContainsKey(TKey key)
    Parameters
    Type Name Description
    TKey key
    Returns
    Type Description
    System.Boolean

    ContainsValue(TValue)

    Declaration
    public bool ContainsValue(TValue value)
    Parameters
    Type Name Description
    TValue value
    Returns
    Type Description
    System.Boolean

    GetEnumerator()

    Declaration
    public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey, TValue>>

    IndexOfKey(TKey)

    Declaration
    public int IndexOfKey(TKey key)
    Parameters
    Type Name Description
    TKey key
    Returns
    Type Description
    System.Int32

    IndexOfValue(TValue)

    Declaration
    public int IndexOfValue(TValue value)
    Parameters
    Type Name Description
    TValue value
    Returns
    Type Description
    System.Int32

    Remove(TKey)

    Declaration
    public bool Remove(TKey key)
    Parameters
    Type Name Description
    TKey key
    Returns
    Type Description
    System.Boolean

    RemoveAt(Int32)

    Declaration
    public void RemoveAt(int index)
    Parameters
    Type Name Description
    System.Int32 index

    TrimExcess()

    Declaration
    public void TrimExcess()

    TryGetValue(TKey, out TValue)

    Declaration
    public bool TryGetValue(TKey key, out TValue value)
    Parameters
    Type Name Description
    TKey key
    TValue value
    Returns
    Type Description
    System.Boolean

    Implements

    System.Collections.Generic.IDictionary<, >
    System.Collections.Generic.ICollection<>
    System.Collections.Generic.IEnumerable<>
    System.Collections.IEnumerable
    System.Collections.IDictionary
    System.Collections.ICollection
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved