Cserés rendezés ListBox-ban

private void Cseresrendezes()
	{		
		List<string> idlist = new List<string>();
 
		foreach(string s in downlistbox.Items)
			idlist.Add(s);
 
		int n = idlist.Count;
 
		//Cserés rendezés
		for(int i=0; i<n -1; i++)
			for(int j=i+1; j<n; j++)
			{
				if(Convert.ToInt32(idlist[i].Split('.')[0])>Convert.ToInt32(idlist[i].Split('.')[0]))
				{
					string swap = idlist[j];
					idlist[j] = idlist[i];
					idlist[i] = swap;
				}
			}
		downlistbox.Items.Clear();
 
		downlistbox.Items.AddRange(idlist.ToArray());
	}