Class StringArray
- Namespace
- VectorDraw.Professional.vdCollections
- Assembly
- VectorDraw.Professional.dll
Represents a collection of string values with utility methods for manipulation, serialization and cloning.
public class StringArray : BaseObject, IDisposable, IBaseObject, IVDSerialise, ICloneable, IEnumerable
- Inheritance
-
StringArray
- Implements
- Inherited Members
Examples
var sa = new StringArray();
sa.AddItem("one");
sa.AddSplit("a,b,c", ",");
string[] items = sa.ToStringArray();
Remarks
The class exposes methods to add, remove and enumerate strings, to convert to a managed array, and to serialize/deserialize through the IVDSerialise contract.
Comparison operations may be performed case-sensitively or case-insensitively using the corresponding method overloads.
Constructors
- StringArray()
Initializes the StringArray collection.
- StringArray(string[])
Initializes a new instance of the object and adds the passed items at the end of this collection.
Properties
- Count
Get the count of items in the collection.
- this[int]
Gets an item from the collection from a specified index.
Methods
- Add(object)
Adds an object to the end of the collection.
- AddItem(string)
Adds a string to the collection.
- AddRange(StringArray)
Adds the items from a collection to this collection.
- AddRange(StringArray, bool, bool)
Adds items from a collection by checking(case sensitive or not) if the item already exists.
- AddSplit(string, string)
Add a string array that contains the substrings in value string that are delimited by elements of a specified splitstr string
- Clone()
Creates a new collection with the same items as this.
- Contains(string, bool)
Checks if an item exists in the collection.
- DeSerialize(DeSerializer, string, object)
This Function is called foreach field name of the StringArray object when opening in vdml format.
- EnsureCapacity(int)
Changes the capacity of the collection to the given value if the existing capacity is less than this value.
- GetEnumerator()
Implements the "foreach" expression for the collection.
- GetValue(string, bool, string)
Checks if a value item exists in the collection, and return the item.
- RemoveAll()
Removes all items from the collection.
- RemoveItem(string)
Removes a specified object from the list.
- Serialize(Serializer)
This Function is called when saving the StringArray object to vdml format.
- SetValue(int, object)
Set the passed value to the specified index.
- ToString()
Gets a System.String that represents the count of the StringArray collection Object.
- ToStringArray()
Returns a string[] array filled with the collection's objects.