Horje
c# list slice Code Example
c# list slice
// list[2:4]
var result1 = myList.Skip(2).Take(2);
// list[1:]
var result2 = myList.Skip(1);
// list[:3]
var result3 = myList.Take(3);
// list[:3] + list[4:]
var result4 = myList.Take(3).Concat(myList.Skip(4));
c# list slice
// only available in .NET Core 3.0   :/

var result1 = myList[2..5]; // end (5) is exclusive
var result2 = myList[1..^0]; // from index 1 to the end 
var result3 = myList[0..3]; // end (3) exclusive




Csharp

Related
unity c# class addition syntax Code Example unity c# class addition syntax Code Example
unity how to end a game with esc Code Example unity how to end a game with esc Code Example
byte to stream c# Code Example byte to stream c# Code Example
snx turn off linux Code Example snx turn off linux Code Example
c# datetimepicker set weeks before today Code Example c# datetimepicker set weeks before today Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10