Skip to content

Instantly share code, notes, and snippets.

@Ibro
Last active May 23, 2018 06:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ibro/a7317171a6abd2da581a78fbba38ca9f to your computer and use it in GitHub Desktop.
Save Ibro/a7317171a6abd2da581a78fbba38ca9f to your computer and use it in GitHub Desktop.
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