Table of Contents

Class NSArray<T>

Namespace
CarinaStudio.MacOS.ObjectiveC
Assembly
CarinaStudio.AppBase.MacOS.dll

NSArray.

public class NSArray<T> : NSObject, IDisposable, IEquatable<NSObject>, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable where T : NSObject

Type Parameters

T
Inheritance
NSArray<T>
Implements
Inherited Members
Extension Methods

Constructors

NSArray(IEnumerable<T>)

Initialize new NSArray<T> instance.

public NSArray(IEnumerable<T> objects)

Parameters

objects IEnumerable<T>

Elements.

NSArray(params T[])

Initialize new NSArray<T> instance.

public NSArray(params T[] objects)

Parameters

objects T[]

Elements.

Properties

Count

Get number of element in array.

public int Count { get; }

Property Value

int

this[int]

Get element at given position.

public T this[int index] { get; }

Parameters

index int

Property Value

T

Methods

Contains(T?)

Check whether given object is contained in array or not.

public bool Contains(T? obj)

Parameters

obj T

Object to check.

Returns

bool

True if given object is contained in array.

CopyTo(T[], int)

Copy elements from array.

public void CopyTo(T[] array, int arrayIndex)

Parameters

array T[]

Array.

arrayIndex int

Index of first position in array to put copied elements.

GetEnumerator()

Get enumerator.

public IEnumerator<T> GetEnumerator()

Returns

IEnumerator<T>

Enumerator.

IndexOf(T)

Get position of given object in array.

public int IndexOf(T obj)

Parameters

obj T

Object to check.

Returns

int

Index of position of object.

Initialize(IntPtr, NSArray<T>)

Initialize allocated instance with array.

protected static IntPtr Initialize(IntPtr obj, NSArray<T> array)

Parameters

obj nint

Handle of allocated instance.

array NSArray<T>

Array.

Returns

nint

Handle of initialized instance.

Initialize(IntPtr, IEnumerable<T>)

Initialize allocated instance with initial objects.

protected static IntPtr Initialize(IntPtr obj, IEnumerable<T> objects)

Parameters

obj nint

Handle of allocated instance.

objects IEnumerable<T>

Objects.

Returns

nint

Handle of initialized instance.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.