Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# slice array

Index i1 = 3;  // number 3 from beginning
Index i2 = ^4; // number 4 from end
int[] a = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
Console.WriteLine($"{a[i1]}, {a[i2]}"); // "3, 6"

var slice = a[i1..i2]; // { 3, 4, 5 }
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to insert data into multiple tables using asp.net c# 
Csharp :: C# Async Function simple 
Csharp :: how create two database conction in laravel 
Csharp :: gql query with parameters 
Csharp :: How to set default page asp.net MVC 
Csharp :: linq select to list 
Csharp :: unity interface 
Csharp :: remove all values from list c# 
Csharp :: c# string verbatim 
Csharp :: create enum from int c# 
Csharp :: instantiate c# 
Csharp :: install active directory windows server 2019 powershell 
Csharp :: static initializer 
Csharp :: reference to gameobject in different scene unity 
Csharp :: add one to one relationship entity framework 
Csharp :: how to call a method from a class c# 
Csharp :: unity set cursor position 
Csharp :: overridable method C# 
Csharp :: rotate skybox on x axis unity 
Csharp :: how to instantiate more enemies in unity 
Csharp :: c# core linq savechanges invalid column name error while adding but not while updating 
Csharp :: convert string to float win forms 
Csharp :: public controller script unity 3d 
Csharp :: custom attribute for auth permission check .net 
Csharp :: c# execute after delay 
Csharp :: mongodb truncation exception c# 
Csharp :: unity ar scale 
Csharp :: handle multiple threads c# 
Csharp :: lista generica como parametro de un metodo en c# 
Csharp :: external font family uwp c# 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =