C# 实现二维数组的排序算法(代码)
//二维数组排序类
class toDimSort
{
//返回第row行的所有元素,是一个一维数组
public object[] GetRowByID(object[,] lists, int row)
{
if (row > (lists.GetLength(0) - 1))
throw new Exception("row超出最大的行索引号");
object[] tmp = new object[lists.GetLength(1)]
;
for (int i = 0; i < lists.GetLength(1); i++)
tmp[i] = lists[row, i];
return tmp;
}
//复制一行数据到指定的行上
public void CopyToRow(object[,] lists, int row, object