Create an empty SortedSet in CSharp
Description
The following code shows how to create an empty SortedSet.
Example
using System;// w ww.j a va 2 s . com
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);
}
foreach(int i in evenNumbers){
Console.WriteLine(i);
}
}
}
The code above generates the following result.