Gs1ElementStringFromBarCodeCharacters(String, Char) Method |
Constructs a Gs1ElementString instance from the specified bar code
representation, using a specified separator character for variable-length AIs.
In the bar code representation, there are no whitespace characters,
and each AI is written as its AI number followed immediately by its value. Each variable length AI except
the last must be followed by the specified separator character.
The input string may optionally contain a three-character bar code symbology identifier
beginning with a right square bracket (]) character. The recognized symbology
identifiers are as follows:
Symbology Identifier | Comments |
---|
]E0 | EAN-13 having 13 digits. This is converted to a GS1 Element String
containing AI 01 with the value zero padded to 14 digits. |
]E4 | EAN-8 having 8 digits. This is converted to a GS1 Element String
containing AI 01 with the value zero padded to 14 digits. |
]I1 | ITF-14 having 14 digits. This is converted to a GS1 Element String
containing AI 01. |
]C1 | GS1-128 containing a concatenated GS1 Element String. The symbology identifier
is stripped off and the remaining characters processed as described above. |
]e0 | GS1 DataBar containing a concatenated GS1 Element String. The symbology identifier
is stripped off and the remaining characters processed as described above. |
]d2 | GS1 DataMatrix containing a concatenated GS1 Element String. The symbology identifier
is stripped off and the remaining characters processed as described above. |
Namespace: GS1.EPC.ApiAssembly: epc-epconly (in epc-epconly.dll) Version: 2.1.0.28145 (2.1.0.0)
Syntaxpublic static Gs1ElementString FromBarCodeCharacters(
string barCode,
char separator
)
Parameters
- barCode String
-
- separator Char
-
Return Value
Gs1ElementString
ExceptionsException | Condition |
---|
Gs1Exception | If the syntax is incorrect, or any AI is unknown, or any AI is repeated,
or the syntax of the AI value is not appropriate for that AI.
|
See Also