Class InpArray<T>
Automatically expanding array (List) of elements. Represents a strongly typed list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists.
Inherited Members
Namespace: DotnetPostprocessing.SDK
Assembly: DotnetPostprocessing.SDK.dll
Syntax
public class InpArray<T> : List<T>, IList<T>, ICollection<T>, IList, ICollection, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable
Type Parameters
| Name | Description |
|---|---|
| T | The type of elements in the array. |
Constructors
InpArray()
Initializes a new instance of the InpArray class that is empty and has the default initial capacity.
Declaration
public InpArray()
InpArray(IEnumerable<T>)
Initializes a new instance of the InpArray class that contains elements copied from the specified collection and has sufficient capacity to accommodate the number of elements copied.
Declaration
public InpArray(IEnumerable<T> collection)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<T> | collection | The collection whose elements are copied to the new list. |
InpArray(int)
Initializes a new instance of the InpArray class that is empty and has the specified initial capacity.
Declaration
public InpArray(int capacity)
Parameters
| Type | Name | Description |
|---|---|---|
| int | capacity | The number of elements that the new list can initially store. |
Properties
Count
Gets or sets the number of elements contained in the array. If you will set the Count less than the previous value then the array will be trimmed. If you will set the Count more than the previous value then the array will be expanded with default values.
Declaration
public int Count { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
this[int]
Gets or sets the element at the specified index. If the index exceeds the total count of elements then the array will expand.
Declaration
public T this[int index] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The zero-based index of the element to get or set. |
Property Value
| Type | Description |
|---|---|
| T | The element at the specified index. |