Vybe Documentation
Vybe Main page
Collections
Vybe provides several specialized collection classes in the System.Collections.Generic namespace for managing groups of objects.
List(Of T)
A strongly-typed list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists.
| Method | Description |
|---|---|
| Add | Adds an object to the end of the List. |
| AddRange | Adds the elements of the specified collection to the end of the List. |
| Insert | Inserts an element into the List at the specified index. |
| Remove | Removes the first occurrence of a specific object from the List. |
| RemoveAt | Removes the element at the specified index. |
| Clear | Removes all elements from the List. |
| Contains | Determines whether an element is in the List. |
| IndexOf | Searches for the specified object and returns the zero-based index of the first occurrence. |
| LastIndexOf | Searches for the specified object and returns the zero-based index of the last occurrence. |
| Sort | Sorts the elements in the entire List. |
| Reverse | Reverses the order of the elements in the entire List. |
| Count | (Property) Gets the number of elements contained in the List. |
Dictionary(Of TKey, TValue)
Represents a collection of keys and values.
| Method | Description |
|---|---|
| Add | Adds the specified key and value to the dictionary. |
| Remove | Removes the value with the specified key. |
| ContainsKey | Determines whether the Dictionary contains the specified key. |
| ContainsValue | Determines whether the Dictionary contains a specific value. |
| TryGetValue | Gets the value associated with the specified key. |
| Clear | Removes all keys and values from the Dictionary. |
| Count | (Property) Gets the number of key/value pairs contained in the Dictionary. |
Queue
Represents a first-in, first-out (FIFO) collection of objects.
| Method | Description |
|---|---|
| Enqueue | Adds an object to the end of the Queue. |
| Dequeue | Removes and returns the object at the beginning of the Queue. |
| Peek | Returns the object at the beginning of the Queue without removing it. |
| Count | (Property) Gets the number of elements contained in the Queue. |
Stack
Represents a last-in, first-out (LIFO) collection of objects.
| Method | Description |
|---|---|
| Push | Inserts an object at the top of the Stack. |
| Pop | Removes and returns the object at the top of the Stack. |
| Peek | Returns the object at the top of the Stack without removing it. |
| Count | (Property) Gets the number of elements contained in the Stack. |
HashSet
Represents a set of values.
| Method | Description |
|---|---|
| Add | Adds the specified element to a set. |
| Remove | Removes the specified element from a HashSet object. |
| Contains | Determines whether a HashSet object contains the specified element. |
| Count | (Property) Gets the number of elements that are contained in a set. |