C# Class Itenso.Sys.Collection.StringCollection

A simple immutable storage utility to hold multiple strings.
Inheritance: System.Collections.ReadOnlyCollectionBase, IStringCollection
Show file Open project: Shereef/RTF-to-HTML-Converter-Class-Library-DLL Class Usage Examples

Public Properties

Property Type Description
Empty IStringCollection

Public Methods

Method Description
Add ( string item ) : int

Adds the given item.

Add ( string item, int pos ) : void

Adds the given item at the given position.

AddAll ( IStringCollection items ) : void

Adds all items in the given list to this instance.

AddCommaSeparated ( string commaSeparatedList ) : void

Adds all items in the given comma separated list to this instance.

Clear ( ) : void
Contains ( string test ) : bool
CopyTo ( string array, int index ) : void

Copies this collections items to the given array.

Equals ( object obj ) : bool
FormatCommaSeparated ( ) : string
FromCommaSeparated ( string commaSeparatedList ) : StringCollection
GetHashCode ( ) : int
IndexOf ( string test ) : int
Remove ( string item ) : void

Removes the given item.

RemoveAll ( IStringCollection items ) : void

Removes all items in the given list from this instance.

RemoveAt ( int index ) : void

Removes the given item.

Sort ( ) : void
StringCollection ( ) : System

Creates a new empty instance.

StringCollection ( ICollection collection ) : System

Creates a new instance with all the items of the given collection.

StringCollection ( IStringCollection collection ) : System

Creates a new instance with all the items of the given collection.

ToString ( ) : string

Lists the contents of this collection.

this ( int index ) : string

Index access to the items of this collection.

Method Details

Add() public method

Adds the given item.
public Add ( string item ) : int
item string the item to add
return int

Add() public method

Adds the given item at the given position.
public Add ( string item, int pos ) : void
item string the item to add
pos int the position to insert the new item into
return void

AddAll() public method

Adds all items in the given list to this instance.
public AddAll ( IStringCollection items ) : void
items IStringCollection the items to add
return void

AddCommaSeparated() public method

Adds all items in the given comma separated list to this instance.
public AddCommaSeparated ( string commaSeparatedList ) : void
commaSeparatedList string the items to add
return void

Clear() public method

public Clear ( ) : void
return void

Contains() public method

public Contains ( string test ) : bool
test string
return bool

CopyTo() public method

Copies this collections items to the given array.
public CopyTo ( string array, int index ) : void
array string the target array
index int the target index
return void

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

FormatCommaSeparated() public method

public FormatCommaSeparated ( ) : string
return string

FromCommaSeparated() public static method

public static FromCommaSeparated ( string commaSeparatedList ) : StringCollection
commaSeparatedList string
return StringCollection

GetHashCode() public method

public GetHashCode ( ) : int
return int

IndexOf() public method

public IndexOf ( string test ) : int
test string
return int

Remove() public method

Removes the given item.
public Remove ( string item ) : void
item string the item to remove
return void

RemoveAll() public method

Removes all items in the given list from this instance.
public RemoveAll ( IStringCollection items ) : void
items IStringCollection the items to remove
return void

RemoveAt() public method

Removes the given item.
public RemoveAt ( int index ) : void
index int the index of the item to remove
return void

Sort() public method

public Sort ( ) : void
return void

StringCollection() public method

Creates a new empty instance.
public StringCollection ( ) : System
return System

StringCollection() public method

Creates a new instance with all the items of the given collection.
public StringCollection ( ICollection collection ) : System
collection ICollection the items to add. may not be null. any non-string items /// in this collection will be returned as null when trying to access them later.
return System

StringCollection() public method

Creates a new instance with all the items of the given collection.
public StringCollection ( IStringCollection collection ) : System
collection IStringCollection the items to add. may not be null. any non-string items /// in this collection will be returned as null when trying to access them later.
return System

ToString() public method

Lists the contents of this collection.
public ToString ( ) : string
return string

this() public method

Index access to the items of this collection.
public this ( int index ) : string
index int the index of the item to retrieve
return string

Property Details

Empty public static property

public static IStringCollection Empty
return IStringCollection