PatternCollection.Add Method

Namespace
Kampute.DocToolkit.Collections
Assembly
  • Kampute.DocToolkit.dll

Definition

Adds a pattern to the collection if it does not already exist.
public virtual bool Add(string pattern)

Parameters

pattern string
The pattern to add to the collection.

Returns

bool
true if the pattern was added; otherwise, false.

Exceptions

ArgumentException
Thrown when pattern is null, empty, or invalid.

Remarks

The pattern can be one of three types:
  • Exact patternA pattern without any wildcard characters
  • Wildcard patternA pattern ending with the separator character followed by the wildcard character
  • Universal matchA single wildcard character that matches all values