CSharp examples for System:Enum
Checks whether this enumerable is empty.
using System.Text; using System.Collections.Generic; using System;/*from ww w. j ava2 s. c o m*/ public class Main{ /// <summary> /// Checks whether this enumerable is empty. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="src"></param> public static bool IsEmpty<T>(this IEnumerable<T> src) { foreach (var item in src) return false; return true; } }