Click or drag to resize

SetT Class

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
A set of values backed by a dictionary.
Inheritance Hierarchy

Namespace:  Telogis.GeoBase
Assembly: (in Version:
public class Set<T> : ICollection<T>, IEnumerable<T>, 

Type Parameters

The type of elements in this Set.

The SetT type exposes the following members.

Public propertyCount
Gets the number of elements contained in the Set.
Public propertyIsReadOnly
Gets a value indicating whether the Set is read-only.
Public methodAdd
Adds an item to the Set.
Public methodAddRange
Adds every element in the enumerable to the Set.
Public methodAny
Returns an arbitary item from the set.
Public methodClear
Removes all items from the Set.
Public methodContains
Determines whether the Set contains a specific value.
Public methodCopyTo
Copies the elements of the Set to an array, starting at a particular array index.
Public methodEquals(Object)
Determines whether the specified object is equal to this Set.
(Overrides ObjectEquals(Object).)
Public methodEquals(SetT)
Determines whether the given Set is equal to this Set.
Public methodGetEnumerator
Returns an enumerator that iterates through the Set.
Public methodGetHashCode
Generates a hash code for the given Set.
(Overrides ObjectGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHasSubset
Checks whether the other Set has all elements in common with this Set (i.e. 'other' is a subset of this Set).
Public methodIntersects(IEnumerableT)
Checks whether the enumerable has any elements in common with this Set.
Public methodIntersects(SetT)
Checks whether the other Set has any elements in common with this Set.
Public methodRemove
Removes the first occurrence of a specific object from the Set.
Public methodToArray
Creates an array containing every element of this Set.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public eventOnAdd
The action to call when Add(T) is called. The item being added will be the parameter to this event.
Trivial use of a Set.
class Program {
    static int Main() {
        Set<int> integersHit1 = new Set<int>();

        for (double counter = 0; counter < 20; counter += (0.5 + counter / 15);) {

        // 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;
See Also