using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
namespace ConsoleApp7LinQ
public static void Main(string[] args)
Stopwatch sw = new Stopwatch();
SortedSet<Account> sorgu = new SortedSet<Account>()
new Account{Id=1, Ad="Muhammet",Soyad="Aytaş",Maasi=3000.00 },
new Account{Id=2, Ad="Salih",Soyad="Durmaz",Maasi=2000.00 },
new Account{Id=3, Ad="Ahmet",Soyad="Kara",Maasi=1000.00 },
new Account{Id=4, Ad="Mehmet",Soyad="Sarı",Maasi=4000.00 },
new Account{Id=5, Ad="Ali",Soyad="Korkmaz",Maasi=3500.00 },
Console.WriteLine(s.Ad + " " + s.Soyad);
string sure = sw.Elapsed.ToString();
class Account:IComparable
public int Id { get; set; }
public string Ad { get; set; }
public string Soyad { get; set; }
public double Maasi { get; set; }
public int CompareTo(object obj)
Account digerHesap = obj as Account;
sonuc = this.Ad.CompareTo(digerHesap.Ad);