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

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