Last active
May 23, 2018 06:23
-
-
Save Ibro/a7317171a6abd2da581a78fbba38ca9f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace SpanOfT_Dev | |
{ | |
public class Program | |
{ | |
private static void Main(string[] args) | |
{ | |
int[] arr = { 0, 1, 2, 3, 4, 5 }; | |
Span<int> span = arr.AsSpan(); | |
Span<int> slice = span.Slice(1, 3); | |
foreach (var i in slice) | |
{ | |
Console.WriteLine(i); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment