排序
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,存在一个显示转换”