C# SortedSet Min

Description

SortedSet Min gets the minimum value in the SortedSet , as defined by the comparer.

Syntax

SortedSet.Min has the following syntax.


public T Min { get; }

Example


//  w w  w.  j  a  v a 2s  . c  o m
using System;
using System.Collections.Generic;

public class MainClass{
  public static void Main(String[] argv){  
    SortedSet<int> evenNumbers = new SortedSet<int>();
    for (int i = 0; i < 5; i++)
    {
        evenNumbers.Add(i * 2);
    }
    Console.WriteLine(evenNumbers.Min);
  }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Collections.Generic »




HashSet
LinkedList
LinkedListNode
List
Queue
SortedSet
Stack