ListHelper.cs 454 B

12345678910111213141516171819
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. namespace MediaBrowser.Model.Extensions
  5. {
  6. public static class ListHelper
  7. {
  8. public static bool ContainsIgnoreCase(List<string> list, string value)
  9. {
  10. if (value == null)
  11. {
  12. throw new ArgumentNullException("value");
  13. }
  14. return list.Contains(value, StringComparer.OrdinalIgnoreCase);
  15. }
  16. }
  17. }