Class ListString
C# realization of IListString
Inheritance
object
ListString
Implements
Namespace: CAMAPI.DotnetHelper
Assembly: CAMAPI.DotnetHelper.dll
Syntax
public class ListString : Object, IListString
Constructors
ListString()
C# realization of IListString
Declaration
public ListString()
ListString(string, char)
C# realization of IListString
Declaration
public ListString(string items, char separator)
Parameters
Type | Name | Description |
---|---|---|
string | items | |
char | separator |
Methods
Add(string)
Add new element
Declaration
public void Add(string element)
Parameters
Type | Name | Description |
---|---|---|
string | element |
Clear()
Clear all elements
Declaration
public void Clear()
Contains(string)
Check if element exists
Declaration
public bool Contains(string element)
Parameters
Type | Name | Description |
---|---|---|
string | element |
Returns
Type | Description |
---|---|
bool |
Count()
Get number of elements
Declaration
public int Count()
Returns
Type | Description |
---|---|
int |
Get(int)
Declaration
public string Get(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index |
Returns
Type | Description |
---|---|
string |
Read(string, string)
Clear existing elements and add new elements from one string with delimiter
Declaration
public void Read(string elements, string delimiter)
Parameters
Type | Name | Description |
---|---|---|
string | elements | |
string | delimiter |
Remove(string)
Remove existing element. If not found, do nothing
Declaration
public void Remove(string element)
Parameters
Type | Name | Description |
---|---|---|
string | element |