算法:输出某个数组所有组合
var arry3 = new string[] { "116.403191", "2", "39.91296", "0001" }; string res = ""; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { if (j == 3) { continue; } //交换位置 string temp = arry3[j + 1]; arry3[j + 1] = arry3[j]; arry3[j] = temp; string md5 = ""; for (int k = 0; k < 4; k++) { md5 += arry3[k]; } res += DL_helper.funcGetMD5(md5) + "<br />"; } } Response.Write(res);