struct ReadOnlySpan<T>

in global :: System

Provides a type-safe and memory-safe read-only representation of a contiguous region of arbitrary memory.

  • T The type of items in the .

public ReadOnlySpan<T>( void* pointer, int length )

Creates a new from a specified number of elements starting at a specified memory address.

  • pointer A pointer to the starting address of a specified number of elements in memory.
  • length The number of elements to be included in the .

public static ReadOnlySpan<T> Empty { get; }

Returns an empty .

  • Returns An empty .

public bool Equals( object obj )

Not supported. Throws a .

  • obj Not supported.
  • Returns Not supported.

public bool IsEmpty { get; }

Returns a value that indicates the current read-only span is empty.

  • Returns when the current span is empty; otherwise .

public int Length { get; }

The number of items in the read-only span.

  • Returns The number of items.

public ReadOnlySpan<T> Slice( int start )

Forms a slice out of the current read-only span that begins at a specified index.

  • start The index at which to begin the slice.
  • Returns A span that consists of all elements of the current span from to the end of the span.

public ReadOnlySpan<T> Slice( int start, int length )

Forms a slice out of the current read-only span starting at a specified index for a specified length.

  • start The index at which to begin this slice.
  • length The desired length for the slice.
  • Returns A read-only span that consists of elements from the current span starting at .

public ReadOnlySpan<T>( ref T reference )

😔 No documentation found.

public ReadOnlySpan<T>( T[] array, int start, int length )

😔 No documentation found.

public ReadOnlySpan<T>( T[] array )

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public T[] ToArray( )

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public static bool op_Equality( ReadOnlySpan<T> left, ReadOnlySpan<T> right )

😔 No documentation found.

public ref T GetPinnableReference( )

😔 No documentation found.

public void CopyTo( Span<T> destination )

😔 No documentation found.

public ReadOnlySpan<T>.Enumerator GetEnumerator( )

😔 No documentation found.

public static ReadOnlySpan<T> CastUp( ReadOnlySpan<TDerived> items )

😔 No documentation found.

public static ReadOnlySpan<T> op_Implicit( ArraySegment<T> segment )

😔 No documentation found.

public static ReadOnlySpan<T> op_Implicit( T[] array )

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.

public static bool op_Inequality( ReadOnlySpan<T> left, ReadOnlySpan<T> right )

😔 No documentation found.

public bool TryCopyTo( Span<T> destination )

😔 No documentation found.

public ref T Item { get; }

😔 No documentation found.