111,097
社区成员




private string[] arraylianhao = { "1", "12", "3", "34", "45" };
private List<string> lstStr;
public Form26()
{
InitializeComponent();
timeLoop(3);
}
void timeLoop(int loop)
{
for (int i = 0; i < loop; i++)
{
cal();
}
}
void cal()
{
string tempA;
lstStr = new List<string>();
for (int i = 0; i < arraylianhao.Length -1; i++)
{
for (int j = i+1; j < arraylianhao.Length; j++)
{
tempA = arraylianhao[i] + "," + arraylianhao[j];
tempA = string.Join(",", tempA.Split(',').Distinct().ToArray());
lstStr.Add(tempA);
}
}
arraylianhao = lstStr.Distinct().ToArray();
}