using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace PDFGenerator.Verifier { public static class Extensions { public static T RemoveAndGet(this IList list) { lock (list) { if (list.Count > 0) { T value = list.Last(); list.Remove(value); return value; } else { return default(T); } } } } }