CSharp examples for System.Collections.Generic:IList
Removes all items from the System.Collections.IList. Deals with null IList
using System.Linq; using System.Collections.Generic; using System.Collections; using System;//from w w w . j a v a 2 s . c o m using Cirrious.CrossCore.Platform; public class Main{ /// <summary> /// Removes all items from the System.Collections.IList. /// Deals with null IList /// </summary> /// <param name="source">The source.</param> public static void SafeClear(this IList source) { if (source != null) source.Clear(); } }