Logo

Programming-Idioms

History of Idiom 135 > diff from v29 to v30

Edit summary for version 30 by ngm:
New Csharp implementation by user [ngm]

Version 29

2019-09-27, 15:44:17

Version 30

2019-09-27, 16:06:47

Idiom #135 Remove item from list, by its value

Remove at most 1 item from list items, having value x.
This will alter the original list or return a new list, depending on which is more idiomatic. If there are several occurrences of x in items, remove only one of them.

Idiom #135 Remove item from list, by its value

Remove at most 1 item from list items, having value x.
This will alter the original list or return a new list, depending on which is more idiomatic. If there are several occurrences of x in items, remove only one of them.

Imports
using System.Collections.Generic;
Code
items.Remove(x);