public void AsReadOnly()
    {
        Span <int> span = stackalloc int[] { 1, 2, 3 };

        CollectionAssert.AreEqual(((ReadOnlySpan <int>)span).ToArray(), span.AsReadOnly().ToArray());
    }
Exemple #2
0
 public static int Max(this Span <int> source) => Max(source.AsReadOnly());
Exemple #3
0
 public void Invoke <TVertex>(Span <TVertex> vertices, Span <int> indices) where TVertex : unmanaged
 {
     _model?.LoadMeshInternal(vertices.AsReadOnly(), indices.AsReadOnly());
 }
Exemple #4
0
 public static ulong Max(this Span <ulong> source) => Max(source.AsReadOnly());