Class BarCodeMatch
The numbers found in a bar code from a given bar code definition.
public class BarCodeMatch
- Inheritance
-
BarCodeMatch
- Inherited Members
Constructors
BarCodeMatch()
Initializes a new instance of the BarCodeMatch class.
public BarCodeMatch()
Properties
Count
Gets the number of numbers found in the bar code.
public int Count { get; }
Property Value
Methods
AddNumber(string, string)
Adds a number.
public void AddNumber(string id, string value)
Parameters
Exceptions
- ArgumentNullException
id
is null.- ArgumentNullException
value
is null.
ContainsNumber(string)
Gets whether the given number exists in the collection of numbers.
public bool ContainsNumber(string id)
Parameters
id
stringThe number identifier.
Returns
Exceptions
- ArgumentNullException
id
is null.
GetNumber(string)
Gets a number from the collection of numbers.
public string GetNumber(string id)
Parameters
id
stringThe identifier of the number to get.
Returns
- string
The value for the number with the given identifier.
Exceptions
- ArgumentNullException
id
is null.- KeyNotFoundException
A number with the given identifier does not exist.
TryGetNumber(string, out string)
Tries to get a number from a collection of numbers.
public bool TryGetNumber(string id, out string value)
Parameters
id
stringThe identifier of the number to get.
value
stringWhen this method returns, contains the number value, if the number was found; otherwise, null.
Returns
Exceptions
- ArgumentNullException
id
is null.