Summary

An ArcGISCollection<T> represents a mutable collection of supported ArcGIS objects. It acts as a lightweight proxy to an underlying native collection and creates managed objects when elements are accessed.

An ArcGISCollection<T> supports foreach iteration, but it is not a List<T>.

Explicit collection specializations are provided for:

Compatible derived types, such as specific layer types, can be passed to supported collection operations where applicable.

Constructors

ArcGISCollection<T>()

Creates an empty ArcGISCollection<T> for a supported element type.

A NotImplementedException is thrown if T is not a supported element type.

Since 1.0.0

Methods

SignatureReturn TypeSummary

Add(T)

ulong

Adds an element to the end of the collection.

AddArray(ArcGISCollection<T>)

ulong

Adds the elements from another collection to the end of this collection.

At(ulong)

T

Returns the element at the specified position.

Contains(T)

bool

Indicates whether the collection contains the specified element.

Equals(ArcGISCollection<T>)

bool

Indicates whether this collection is equal to another collection.

First()

T

Returns the first element in the collection.

GetSize()

ulong

Returns the number of elements in the collection.

IndexOf(T)

ulong

Returns the position of the specified element in the collection.

Insert(ulong, T)

void

Inserts an element at the specified position.

IsEmpty()

bool

Indicates whether the collection contains no elements.

Last()

T

Returns the last element in the collection.

Move(ulong, ulong)

void

Moves an element from one position to another.

Npos()

ulong

Returns the value used to indicate that a position was not found.

Remove(ulong)

void

Removes the element at the specified position.

RemoveAll()

void

Removes all elements from the collection.

Add

ulong Add(T value)

Adds an element to the end of the collection.

Since 1.0.0

Arguments
NameTypeSummary
valueT

The element to add.

Returns ulong

The position where the element was added.

AddArray

ulong AddArray(ArcGISCollection<T> vector2)

Adds the elements from another collection to the end of this collection.

Since 1.0.0

Arguments
NameTypeSummary
vector2ArcGISCollection<T>

The collection containing the elements to add.

Returns ulong

The position returned after the elements are added.

At

T At(ulong position)

Returns the element at the specified position.

The managed object is created when the element is accessed.

Since 1.0.0

Arguments
NameTypeSummary
positionulong

The zero-based position of the element.

Returns T

The element at the specified position.

Contains

bool Contains(T value)

Indicates whether the collection contains the specified element.

Since 1.0.0

Arguments
NameTypeSummary
valueT

The element to find.

Returns bool

true if the collection contains the element; otherwise, false.

Equals

bool Equals(ArcGISCollection<T> vector2)

Indicates whether this collection is equal to another collection.

Since 1.0.0

Arguments
NameTypeSummary
vector2ArcGISCollection<T>

The collection to compare.

Returns bool

true if the collections are equal; otherwise, false.

First

T First()

Returns the first element in the collection.

The managed object is created when the element is accessed.

Since 1.0.0

Returns T

The first element in the collection.

GetSize

ulong GetSize()

Returns the number of elements in the collection.

Since 1.0.0

Returns ulong

The number of elements in the collection.

IndexOf

ulong IndexOf(T value)

Returns the position of the specified element in the collection.

Since 1.0.0

Arguments
NameTypeSummary
valueT

The element to find.

Returns ulong

The position of the element, or Npos if the element is not found.

Insert

void Insert(ulong position, T value)

Inserts an element at the specified position.

Since 1.0.0

Arguments
NameTypeSummary
positionulong

The zero-based position where the element will be inserted.

valueT

The element to insert.

Returns void

This method does not return a value.

IsEmpty

bool IsEmpty()

Indicates whether the collection contains no elements.

Since 1.0.0

Returns bool

true if the collection is empty; otherwise, false.

Last

T Last()

Returns the last element in the collection.

The managed object is created when the element is accessed.

Since 1.0.0

Returns T

The last element in the collection.

Move

void Move(ulong oldPosition, ulong newPosition)

Moves an element from one position to another.

Since 1.0.0

Arguments
NameTypeSummary
oldPositionulong

The current zero-based position of the element.

newPositionulong

The new zero-based position of the element.

Returns void

This method does not return a value.

Npos

ulong Npos()

Returns the value used to indicate that a position was not found.

Since 1.0.0

Returns ulong

The value representing an invalid or unavailable position.

Remove

void Remove(ulong position)

Removes the element at the specified position.

Since 1.0.0

Arguments
NameTypeSummary
positionulong

The zero-based position of the element to remove.

Returns void

This method does not return a value.

RemoveAll

void RemoveAll()

Removes all elements from the collection.

Since 1.0.0

Returns void

This method does not return a value.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.