BlogEngine.Core.Providers.XmlRoleProvider.RemoveItemFromList C# (CSharp) Method

RemoveItemFromList() private static method

The remove item from list.
private static RemoveItemFromList ( ICollection list, string item ) : void
list ICollection /// The list of string. ///
item string /// The item of string. ///
return void
        private static void RemoveItemFromList(ICollection<string> list, string item)
        {
            if (list == null || string.IsNullOrEmpty(item) || list.Count == 0)
            {
                return;
            }

            var usersToRemove = list.Where(u => u.Equals(item, StringComparison.OrdinalIgnoreCase)).ToList();

            foreach (var u in usersToRemove)
            {
                list.Remove(u);
            }
        }