Table of Contents

Class SafeStringCollection

Namespace
SunamoCollectionsGeneric.Collections
Assembly
SunamoCollectionsGeneric.dll

A string collection that replaces unallowed characters with a safe replacement character

public class SafeStringCollection
Inheritance
SafeStringCollection
Inherited Members
Extension Methods

Constructors

SafeStringCollection(List<char>, char)

Initializes a new instance with characters to replace and the replacement character

public SafeStringCollection(List<char> unallowedChars, char replacementCharacter)

Parameters

unallowedChars List<char>

List of characters that are not allowed

replacementCharacter char

The character to replace unallowed characters with

Properties

Items

Gets or sets the list of sanitized string items

public List<string> Items { get; set; }

Property Value

List<string>

Methods

Add(string)

Adds a string to the collection after replacing all unallowed characters

public void Add(string text)

Parameters

text string

The text to add