Delete duplicate rows from two dimentsional array
问题 Let's say I have two dimensional array that represents simple matrix int[,] matrix= new int[,] { { 1, 2 }, { 3, 4 }, { 1, 2 }, { 7, 8 } }; It looks like that 1 2 3 4 1 2 7 8 Is there any way to delete duplicate rows using LINQ and make array to look like this? 1 2 3 4 7 8 回答1: This is not really Linq, but you can define some helper method as if they were Linq methods. The simpler algorithm should be: Convert to a list of list Apply a distinct with a custom comparer Rebuild another array This