Class RecordArray<T>
Helper class for working with a collection of records. Provides search for an element index by string key.
Inherited Members
Namespace: DotNet.Interpreter.Helper
Assembly: DotNet.Interpreter.Helper.dll
Syntax
public class RecordArray<T>
Type Parameters
| Name | Description |
|---|---|
| T | Type of collection element. |
Constructors
RecordArray()
Declaration
public RecordArray()
Methods
Add(T)
Adds an element to the collection.
Declaration
public void Add(T item)
Parameters
| Type | Name | Description |
|---|---|---|
| T | item | Element to add. |
IndexOfTextKey(string, int)
Searches for an element index in the array by string key, starting from the specified index. For string types, comparison is performed case-insensitive.
Declaration
public int IndexOfTextKey(string key, int startIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | String key for search. |
| int | startIndex | Index from which to start the search. |
Returns
| Type | Description |
|---|---|
| int | Index of the found element or -1 if the element is not found. |