16,554
社区成员
发帖
与我相关
我的任务
分享
for i=0 to row-1
tt=objcus(i).sen
for j=0 to row-1
yy=objcus(j).sen
if yy=tt then
else
for k=0 to row-1
nn=objcus(k).sen
if tt=nn or yy=nn then
else
debug.print("rowindex=" & rowindex)
end if
next
next
next
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int[][] data =
{
new int[] { 1, 2, 3 },
new int[] { 1, 3, 5 },
new int[] { 1, 2, 6 },
new int[] { 3, 7, 8 },
new int[] { 2, 4, 5 },
new int[] { 3, 5, 6 }
};
var result = data.GroupBy(x => x[0]).Select(x => x.First())
.GroupBy(x => x[1]).Select(x => x.First())
.GroupBy(x => x[2]).Select(x => x.First());
foreach (var item in result)
{
Console.WriteLine(string.Join(", ", item.ToArray()));
}
}
}
}
1, 2, 3
3, 7, 8
2, 4, 5
Press any key to continue . . .