Get the minimum value in the SortedSet as defined by the comparer in CSharp
Description
The following code shows how to get the minimum value in the SortedSet as defined by the comparer.
Example
/*from w ww. ja v a 2 s . 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.