Click or drag to resize

StringSet Methods

The StringSet type exposes the following members.

Methods
  NameDescription
Public methodAdd(IList)
Add items from a list of items.
Public methodAdd(Object)
Add a new item to the set. Note that the item must be a string, be convertable to a string using value.ToString(), or be null/DBNull.
Public methodAdd(String)
Add a string to the set if not already there.
Public methodAdd(String)
Add items from an array of strings. Note that blank and null items are skipped.
Public methodAdd(StringSet)
Add items from the provide set of strings into this set. Note that blank and null items are skipped.
Public methodAdd(String, Char)
Add items from a separator-separated list of items. For example, adding "a;b;c" with ';' separator adds 3 items, "a", "b", "c". Note that blank and null items are skipped.
Public methodAdd(String, Char, SplitOptions)
Add items from a separator-separated list of items. For example, adding "a;b;c" with ';' separator adds 3 items, "a", "b", "c". Note that blank and null items are skipped.
Public methodAddRange
Copies the elements of a string array to the end of the StringCollection.
(Inherited from StringCollection.)
Public methodClear
Removes all the strings from the StringCollection.
(Inherited from StringCollection.)
Public methodContains(String)
Determines whether the specified string is in the StringCollection.
(Inherited from StringCollection.)
Public methodContains(String, StringComparison) Obsolete.
Determines if this set contains one or more strings matching (equaling) the specified value. Attention: This method returns true if any string in the collection CONTAINS the specified value. Use Contains(String, StringComparisonTypes, StringComparison) with Equals to determine if this collection contains any strings that EQUAL the specified value.
Public methodContains(String, StringComparisonTypes, StringComparison)
Determines if this set contains one or more strings matching (per the comparison type) the specified value. Attention: This overload is recommended over the counter-intuitive Contains(String, StringComparison) overload.
Public methodCopyTo
Copies the entire StringCollection values to a one-dimensional array of strings, starting at the specified index of the target array.
(Inherited from StringCollection.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFromString(String)
Clear the set and populate it from the specified string with items separated by the default delimiter.
Public methodFromString(String, Char)
Clear the set and populate it from the specified string with items separated by the specified delimiter.
Public methodFromString(String, Char, SplitOptions)
Clear the set and populate it from the specified string with items separated by the specified delimiter.
Public methodGetEnumerator
Returns a StringEnumerator that iterates through the StringCollection.
(Inherited from StringCollection.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIndexOf
Searches for the specified string and returns the zero-based index of the first occurrence within the StringCollection.
(Inherited from StringCollection.)
Public methodInsert
Inserts a string into the StringCollection at the specified index.
(Inherited from StringCollection.)
Public methodIntersection(StringSet)
Create a new StringSet containing the intersection of the current StringSet and the specified StringSet.
Public methodIntersection(StringSet, StringComparisonTypes, StringComparison)
Create a new StringSet containing the intersection of the current StringSet and the specified StringSet per the specified string comparison options.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemove
Removes the first occurrence of a specific string from the StringCollection.
(Inherited from StringCollection.)
Public methodRemoveAt
Removes the string at the specified index of the StringCollection.
(Inherited from StringCollection.)
Public methodToInClause
Generate a SQL IN clause (without parentheses) from the contents of the list. Note that null/empty values are omitted.
Public methodToString
Convert the collection to a string list of items separated by the default delimiter.
Public methodToString(String)
Convert the collection to a string list of items separated by the specified delimiter.
Top
Extension Methods
  NameDescription
Public Extension MethodEqualValue
Determines if the object value is equal to another object. If the two objects are null, then this returns true. There is special handling for guid comparisons (since a guid could be a string formatted in up to 3 different ways). If the special guid handling is not performed, then the object.Equals method is used.
(Defined by EAPUtil.)
Public Extension MethodToArray
Copy the collection to a string array, possibly empty, but never null.
(Defined by StringUtils.)
Top
See Also