I'm trying to write simple extension method for SelectList. API confuses me.
public static SelectList Without(this SelectList selectList,int val){
//return new SelectList(selectList.Items.Where(x=>x.Value!=val)); <-----???
}
It should return new select list with same items w/o one which value matches argument val.
selectList.Items.Where(x=>x.Value!=val)becauseItems.GetType==typeof(IEnumerable)