Class StringList
- Namespace
- Microsoft.Exchange.WebServices.Data
- Assembly
- Microsoft.Exchange.WebServices.dll
Represents a list of strings.
public sealed class StringList : ComplexProperty, IEnumerable<string>, IEnumerable
- Inheritance
-
StringList
- Implements
- Inherited Members
Constructors
StringList()
Initializes a new instance of the StringList class.
public StringList()
StringList(IEnumerable<string>)
Initializes a new instance of the StringList class.
public StringList(IEnumerable<string> strings)
Parameters
strings
IEnumerable<string>The strings.
Properties
Count
Gets the number of strings in the list.
public int Count { get; }
Property Value
this[int]
Gets or sets the string at the specified index.
public string this[int index] { get; set; }
Parameters
index
intThe index of the string to get or set.
Property Value
- string
The string at the specified index.
Methods
Add(string)
Adds a string to the list.
public void Add(string s)
Parameters
s
stringThe string to add.
AddRange(IEnumerable<string>)
Adds multiple strings to the list.
public void AddRange(IEnumerable<string> strings)
Parameters
strings
IEnumerable<string>The strings to add.
Clear()
Clears the list.
public void Clear()
Contains(string)
Determines whether the list contains a specific string.
public bool Contains(string s)
Parameters
s
stringThe string to check the presence of.
Returns
- bool
True if s is present in the list, false otherwise.
Equals(object)
public override bool Equals(object obj)
Parameters
Returns
Exceptions
- NullReferenceException
The
obj
parameter is null.
GetEnumerator()
Gets an enumerator that iterates through the elements of the collection.
public IEnumerator<string> GetEnumerator()
Returns
- IEnumerator<string>
An IEnumerator for the collection.
GetHashCode()
Serves as a hash function for a particular type.
public override int GetHashCode()
Returns
Remove(string)
Removes a string from the list.
public bool Remove(string s)
Parameters
s
stringThe string to remove.
Returns
- bool
True is s was removed, false otherwise.
RemoveAt(int)
Removes the string at the specified position from the list.
public void RemoveAt(int index)
Parameters
index
intThe index of the string to remove.
ToString()
Generates a string representation of all the items in the list.
public override string ToString()
Returns
- string
A comma-separated list of the strings present in the list.