/// <summary> /// Removes the value from the list of properties. /// </summary> /// <param name="value">The value to remove.</param> /// <returns>True if the value was successfully removed, false otherwise.</returns> virtual public bool Remove(T value) { if (m_PropertyList.ContainsKey(m_PropertyName)) { // Search for a property that contains this value. ICalendarProperty property = m_PropertyList .AllOf(m_PropertyName) .Where(p => p.ContainsValue(value)) .FirstOrDefault(); // If we found a property that contains this value, then let's remove it. if (property != null) { // Remove the value property.RemoveValue(value); // If this property doesn't contain any more values, then // let's also remove the property itself. if (property.Values.Count() == 0) { m_PropertyList.Remove(property); } return(true); } } return(false); }