CSharp examples for System.Collections.Generic:List
List Equals by LINQ
using System.Linq; using System.Collections.Generic; using System.Collections; using System;/*from w ww. j a va 2 s . c om*/ public class Main{ public static bool ListEquals<T>(IList<T> a, IList<T> b) { if (a == null || b == null) { return a == null && b == null; } if (a.Count != b.Count) { return false; } return !a.Where((t, i) => !Equals(t, b[i])).Any(); } }