我有一个结构数组,其中有一个名为total的数据项。我想根据整数数据项'total'对这个数组进行排序。根据结构数组c中的值排序#
struct Disease
{
public int male;
public int female;
public int total=0;
public string diseaseName;
}
Disease [] opDisease = new Disease [21];
opDisease[0].total= somevalue1;
opDisease[1].total= somevalue2;
...
...
...
...
I want to sort opDisease array based on the value of 'total'.
thank you!
。 ... 你试过什么了? –