Span<T>

Overview

Span is a writable span (block of memory that could be an array or pointer) of a given size.

Location

 

constructor UIKit for Mac

 

constructor

 

Span<T>()

 

init()

 

Span<T>()

 

Sub New()

constructor (array of T, Int32, Int32) Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

constructor(aArray: array of T; aStart: Int32; aLength: Int32)

 

Span<T>(T[] aArray, Int32 aStart, Int32 aLength)

 

init(_ aArray: T..., _ aStart: Int32, _ aLength: Int32)

 

Span<T>(T[] aArray, Int32 aStart, Int32 aLength)

 

Sub New(aArray As T(), aStart As Int32, aLength As Int32)

Parameters:

  • aArray:
  • aStart:
  • aLength:

constructor (^T, Int32) Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

constructor(aPointer: ^T; aLength: Int32)

 

Span<T>(T* aPointer, Int32 aLength)

 

init(_ aPointer: UnsafeMutablePointer<T>, _ aLength: Int32)

 

Span<T>(T* aPointer, Int32 aLength)

 

Sub New(aPointer As Ptr(Of T), aLength As Int32)

Parameters:

  • aPointer:
  • aLength:

Data

Returns the data at a given offset.

 

property Data[i: Int32]: T read write;

 

T Data[Int32 i] { get; set; }

 

subscript Data(_ i: Int32) -> T { get{} set{} }

 

T Data[Int32 i] { __get; __set; }

 

Property Data(i As Int32) As T

Empty

Returns true if empty (count = 0).

 

property Empty: Boolean read;

 

Boolean Empty { get; }

 

var Empty: Boolean { get{} }

 

Boolean Empty { __get; }

 

ReadOnly Property Empty() As Boolean

Empty

Returns an empty span object.

 

class property Empty: Span<T> read;

 

class Span<T> Empty { get; }

 

static var Empty: Span<T> { get{} }

 

class Span<T> Empty { __get; }

 

Shared ReadOnly Property Empty() As Span<T>

Equals (Object): Boolean  virtual    (declared in Object) Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

method Equals(aOther: Object): Boolean

 

Boolean Equals(Object aOther)

 

func Equals(_ aOther: Object) -> Boolean

 

Boolean Equals(Object aOther)

 

Function Equals(aOther As Object) As Boolean

Parameters:

  • aOther:

Equals (Object): Boolean  virtual    (declared in Object) UIKit for Mac

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

 

Function Equals(obj As Object) As Boolean

Parameters:

  • obj: the reference to compare this with.

Finalize  protected virtual    (declared in Object) UIKit for Mac

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

Finalize()

 

func Finalize()

 

Finalize()

 

Sub Finalize()

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

 

Function GetHashCode() As Int32

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

 

Function GetType() As Type

Length

Contains the length of this span.

 

property Length: Int32 read;

 

Int32 Length { get; }

 

var Length: Int32 { get{} }

 

Int32 Length { __get; }

 

ReadOnly Property Length() As Int32

Pointer

Returns a pointer to the first element.

 

property Pointer: ^T read;

 

T* Pointer { get; }

 

var Pointer: UnsafeMutablePointer<T> { get{} }

 

T* Pointer { __get; }

 

ReadOnly Property Pointer() As Ptr(Of T)

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

Parameters:

  • a: left value
  • b: right value

Slice (Int32): Span<T>

Slice this span. Slicing can only shrink, not grow the span.

 

method Slice(aStart: Int32): Span<T>

 

Span<T> Slice(Int32 aStart)

 

func Slice(_ aStart: Int32) -> Span<T>

 

Span<T> Slice(Int32 aStart)

 

Function Slice(aStart As Int32) As Span<T>

Parameters:

  • aStart:

Slice (Int32, Int32): Span<T>

Slice this span. Slicing can only shrink, not grow the span.

 

method Slice(aStart: Int32; aLength: Int32): Span<T>

 

Span<T> Slice(Int32 aStart, Int32 aLength)

 

func Slice(_ aStart: Int32, _ aLength: Int32) -> Span<T>

 

Span<T> Slice(Int32 aStart, Int32 aLength)

 

Function Slice(aStart As Int32, aLength As Int32) As Span<T>

Parameters:

  • aStart:
  • aLength:

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

 

Data

Returns the data at a given offset.

 

property Data[i: Int32]: T read write;

 

T Data[Int32 i] { get; set; }

 

subscript Data(_ i: Int32) -> T { get{} set{} }

 

T Data[Int32 i] { __get; __set; }

 

Property Data(i As Int32) As T

Empty

Returns true if empty (count = 0).

 

property Empty: Boolean read;

 

Boolean Empty { get; }

 

var Empty: Boolean { get{} }

 

Boolean Empty { __get; }

 

ReadOnly Property Empty() As Boolean

Length

Contains the length of this span.

 

property Length: Int32 read;

 

Int32 Length { get; }

 

var Length: Int32 { get{} }

 

Int32 Length { __get; }

 

ReadOnly Property Length() As Int32

Pointer

Returns a pointer to the first element.

 

property Pointer: ^T read;

 

T* Pointer { get; }

 

var Pointer: UnsafeMutablePointer<T> { get{} }

 

T* Pointer { __get; }

 

ReadOnly Property Pointer() As Ptr(Of T)

Empty

Returns an empty span object.

 

class property Empty: Span<T> read;

 

class Span<T> Empty { get; }

 

static var Empty: Span<T> { get{} }

 

class Span<T> Empty { __get; }

 

Shared ReadOnly Property Empty() As Span<T>

 

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

Parameters:

  • a: left value
  • b: right value

 

constructor UIKit for Mac

 

constructor

 

Span<T>()

 

init()

 

Span<T>()

 

Sub New()

constructor (array of T, Int32, Int32) Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

constructor(aArray: array of T; aStart: Int32; aLength: Int32)

 

Span<T>(T[] aArray, Int32 aStart, Int32 aLength)

 

init(_ aArray: T..., _ aStart: Int32, _ aLength: Int32)

 

Span<T>(T[] aArray, Int32 aStart, Int32 aLength)

 

Sub New(aArray As T(), aStart As Int32, aLength As Int32)

Parameters:

  • aArray:
  • aStart:
  • aLength:

constructor (^T, Int32) Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

constructor(aPointer: ^T; aLength: Int32)

 

Span<T>(T* aPointer, Int32 aLength)

 

init(_ aPointer: UnsafeMutablePointer<T>, _ aLength: Int32)

 

Span<T>(T* aPointer, Int32 aLength)

 

Sub New(aPointer As Ptr(Of T), aLength As Int32)

Parameters:

  • aPointer:
  • aLength:

Equals (Object): Boolean  virtual    (declared in Object) Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, WebAssembly, Windows

 

method Equals(aOther: Object): Boolean

 

Boolean Equals(Object aOther)

 

func Equals(_ aOther: Object) -> Boolean

 

Boolean Equals(Object aOther)

 

Function Equals(aOther As Object) As Boolean

Parameters:

  • aOther:

Equals (Object): Boolean  virtual    (declared in Object) UIKit for Mac

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

 

Function Equals(obj As Object) As Boolean

Parameters:

  • obj: the reference to compare this with.

Finalize  protected virtual    (declared in Object) UIKit for Mac

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

Finalize()

 

func Finalize()

 

Finalize()

 

Sub Finalize()

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

 

Function GetHashCode() As Int32

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

 

Function GetType() As Type

Slice (Int32): Span<T>

Slice this span. Slicing can only shrink, not grow the span.

 

method Slice(aStart: Int32): Span<T>

 

Span<T> Slice(Int32 aStart)

 

func Slice(_ aStart: Int32) -> Span<T>

 

Span<T> Slice(Int32 aStart)

 

Function Slice(aStart As Int32) As Span<T>

Parameters:

  • aStart:

Slice (Int32, Int32): Span<T>

Slice this span. Slicing can only shrink, not grow the span.

 

method Slice(aStart: Int32; aLength: Int32): Span<T>

 

Span<T> Slice(Int32 aStart, Int32 aLength)

 

func Slice(_ aStart: Int32, _ aLength: Int32) -> Span<T>

 

Span<T> Slice(Int32 aStart, Int32 aLength)

 

Function Slice(aStart As Int32, aLength As Int32) As Span<T>

Parameters:

  • aStart:
  • aLength:

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String