まったくソートされていないリストがあります。.Sort を使用しましたが、機能していません。数値を降順に並べ替えたい。9,6,4,3,2
List<string> tem = new List<string>();
using (SqlConnection cs = new SqlConnection(connStr))
{
cs.Open();
for (int x = 0; x < length; x++)
{
SqlCommand select = new SqlCommand("spTicketIssuance_GetTransactions", cs);
select.CommandType = System.Data.CommandType.StoredProcedure;
select.Parameters.AddWithValue("@TransDesc", TransType[x]);
SqlDataReader dr = select.ExecuteReader();
while (dr.Read())
{
tem.Add(dr["TransTime"].ToString()); //Adds all Transaction in the multiline textbox and adds them to List TransList
}
dr.Close();
}
tem.Sort(); //NOT SORTING
cs.Close();
}