I got a list:
var x = new List<string>(){"a","b","c"}
I am looking for an pretty easy way to change all items after a
example:
var x = new List<string>(){"a","b","c"}
var y = new List<string>(){"d","e","f"}
x.addAfterFirst(y);
result x= "a","d","e","f"
I know that’ x.Skip(1)’ can return me the info. I need to set it.
You can use the Take Extension Method to take the first n items from
xand concat them withyusing the Concat Extension Method:If you want to modify
xin-place instead of creating a new list, you can use the RemoveRange Method to remove all items after the first n items, and the AddRange Method to appendytox: