CSharp examples for System.Collections.Generic:IEnumerable
IEnumerable First Or Default
// LICENSE: LGPL 3 - https://www.gnu.org/licenses/lgpl-3.0.txt using System.Linq; using System.Collections.Generic; public class Main{ /// <summary> /// //from w w w.j a v a 2 s. co m /// </summary> /// <see cref="Enumerable.FirstOrDefault{TSource}(IEnumerable{TSource})" /> /// <remarks>Replaced in .NET 3.5 for .NET 2.0</remarks> public static T FirstOrDefault<T>(IEnumerable<T> seq) { return global::System.Linq.Enumerable.FirstOrDefault<T>(seq); } }