StringSet Class |
Namespace: NetQuarry
The StringSet type exposes the following members.
Name | Description | |
---|---|---|
StringSet |
Default constructor.
| |
StringSet(StringCollection) |
Construct the set from a StringCollection object.
| |
StringSet(String) |
Construct the set from the specified array of strings.
| |
StringSet(String, Char) |
Contruct the set 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.
| |
StringSet(String, Char, SplitOptions) |
Contruct the set from a separator-separated list of items.
For example, adding "a;b;c" with ';' separator adds 3 items, "a", "b", "c".
Note that opts can be used to trim and/or include blank and null items.
|
Name | Description | |
---|---|---|
Count | Gets the number of strings contained in the StringCollection. (Inherited from StringCollection.) | |
IsReadOnly | Gets a value indicating whether the StringCollection is read-only. (Inherited from StringCollection.) | |
IsSynchronized | Gets a value indicating whether access to the StringCollection is synchronized (thread safe). (Inherited from StringCollection.) | |
Item | Gets or sets the element at the specified index. (Inherited from StringCollection.) | |
SyncRoot | Gets an object that can be used to synchronize access to the StringCollection. (Inherited from StringCollection.) |
Name | Description | |
---|---|---|
Add(IList) |
Add items from a list of items.
| |
Add(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.
| |
Add(String) |
Add a string to the set if not already there.
| |
Add(String) |
Add items from an array of strings.
Note that blank and null items are skipped.
| |
Add(StringSet) |
Add items from the provide set of strings into this set.
Note that blank and null items are skipped.
| |
Add(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.
| |
Add(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.
| |
AddRange | Copies the elements of a string array to the end of the StringCollection. (Inherited from StringCollection.) | |
Clear | Removes all the strings from the StringCollection. (Inherited from StringCollection.) | |
Contains(String) | Determines whether the specified string is in the StringCollection. (Inherited from StringCollection.) | |
Contains(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.
| |
Contains(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. | |
CopyTo | Copies the entire StringCollection values to a one-dimensional array of strings, starting at the specified index of the target array. (Inherited from StringCollection.) | |
Equals | (Inherited from Object.) | |
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
FromString(String) |
Clear the set and populate it from the specified string with items
separated by the default delimiter.
| |
FromString(String, Char) |
Clear the set and populate it from the specified string with items
separated by the specified delimiter.
| |
FromString(String, Char, SplitOptions) |
Clear the set and populate it from the specified string with items
separated by the specified delimiter.
| |
GetEnumerator | Returns a StringEnumerator that iterates through the StringCollection. (Inherited from StringCollection.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IndexOf | Searches for the specified string and returns the zero-based index of the first occurrence within the StringCollection. (Inherited from StringCollection.) | |
Insert | Inserts a string into the StringCollection at the specified index. (Inherited from StringCollection.) | |
Intersection(StringSet) |
Create a new StringSet containing the intersection of the current
StringSet and the specified StringSet.
| |
Intersection(StringSet, StringComparisonTypes, StringComparison) |
Create a new StringSet containing the intersection of the current StringSet and the specified StringSet
per the specified string comparison options.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Remove | Removes the first occurrence of a specific string from the StringCollection. (Inherited from StringCollection.) | |
RemoveAt | Removes the string at the specified index of the StringCollection. (Inherited from StringCollection.) | |
ToInClause |
Generate a SQL IN clause (without parentheses) from the contents of the list.
Note that null/empty values are omitted.
| |
ToString |
Convert the collection to a string list of items separated by the default delimiter.
| |
ToString(String) |
Convert the collection to a string list of items separated by the specified delimiter.
|
Name | Description | |
---|---|---|
EqualValue |
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.) | |
ToArray |
Copy the collection to a string array, possibly empty, but never null.
(Defined by StringUtils.) |