SetT Class | ![]() |
Namespace: Telogis.GeoBase
The SetT type exposes the following members.
Name | Description | |
---|---|---|
![]() | SetT |
Initializes a new Set.
|
![]() | SetT(IEnumerableT) |
Initializes a new Set that includes the values from the enumerable provided.
|
![]() | SetT(Int32) |
Initializes a new Set and sets the backing dictionary to have the specified size to start with.
|
Name | Description | |
---|---|---|
![]() | Count |
Gets the number of elements contained in the Set.
|
![]() | IsReadOnly |
Gets a value indicating whether the Set is read-only.
|
Name | Description | |
---|---|---|
![]() | Add |
Adds an item to the Set.
|
![]() | AddRange |
Adds every element in the enumerable to the Set.
|
![]() | Any |
Returns an arbitary item from the set.
|
![]() | Clear |
Removes all items from the Set.
|
![]() | Contains |
Determines whether the Set contains a specific value.
|
![]() | CopyTo |
Copies the elements of the Set to an array, starting at a particular array index.
|
![]() | Equals(Object) |
Determines whether the specified object is equal to this Set.
(Overrides ObjectEquals(Object).) |
![]() | Equals(SetT) |
Determines whether the given Set is equal to this Set.
|
![]() | GetEnumerator |
Returns an enumerator that iterates through the Set.
|
![]() | GetHashCode |
Generates a hash code for the given Set.
(Overrides ObjectGetHashCode.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | HasSubset |
Checks whether the other Set has all elements in common with this Set (i.e. 'other' is a subset of this Set).
|
![]() | Intersects(IEnumerableT) |
Checks whether the enumerable has any elements in common with this Set.
|
![]() | Intersects(SetT) |
Checks whether the other Set has any elements in common with this Set.
|
![]() | Remove |
Removes the first occurrence of a specific object from the Set.
|
![]() | ToArray |
Creates an array containing every element of this Set.
|
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
![]() | OnAdd |
The action to call when Add(T) is called.
The item being added will be the parameter to this event.
|
class Program { static int Main() { Set<int> integersHit1 = new Set<int>(); for (double counter = 0; counter < 20; counter += (0.5 + counter / 15);) { integersHit.Add((int)counter); } // integersHit1 added: 0, 0, 1, 1, 2, 2, 3, 4, 5, 5, 6, 7, 8, 9, 11, 12, 13, 14, 16, 18, 19 // integersHit1 -> 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 16, 18, 19 return 0; } }