排序
public void sort(double[] a, int b){
for (double i = 1.0; i < Convert.ToDouble(b - 1); i++)
{
double k = i;
for (double j = i + 1; j < Convert.ToDouble(b); j++)
{
if (a[j] > a[k])
{ k = j; }
}
if (k != i)
{
double t = 0;
t = a[i];
a[i] = a[k];
a[k] = t;
}
}
}
请问这个排序方法错在哪里,系统总是多处报错“无法将类型double隐式转换为int,存在一个显示转换”,请解释详细点,3q!