【发布时间】:2018-06-09 12:50:16
【问题描述】:
我有一个数组列表...我想检查一个确切的数组是否在列表中
List<int[]> Output = new List<int[]>();
我有一个数组
int[] coordinates
我想检查坐标数组是否完全在列表中?
【问题讨论】:
我有一个数组列表...我想检查一个确切的数组是否在列表中
List<int[]> Output = new List<int[]>();
我有一个数组
int[] coordinates
我想检查坐标数组是否完全在列表中?
【问题讨论】:
使用SequenceEqual:
bool result = Output.Any(a => a.SequenceEqual(coordinates));
【讨论】: