Skip to content

Instantly share code, notes, and snippets.

@Ibro Ibro/Span.cs
Last active May 23, 2018

Embed
What would you like to do?
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
You can’t perform that action at this time.