Click or drag to resize

EpcFromComponents Method

Creates an Epc instance from the specified EPC scheme and components. The resulting Epc instance will have an pure identity EPC URI consisting of urn:epc:id:, the specified EPC scheme name, a colon (:) character, and the specified components separated by dot (.) characters with %xx escape sequences as required to conform to URI syntax.

Example: fromComponents(EpcScheme.SGTIN, "0614141", "112345", "a/b") returns an Epc instance whose pure identity EPC URI is urn:epc:id:sgtin:0614141.112345.a%2Fb.


Namespace: GS1.EPC.Api
Assembly: epc-epconly (in epc-epconly.dll) Version: 2.1.0.28145 (2.1.0.0)
Syntax
C#
public static Epc FromComponents(
	EpcScheme scheme,
	params string[] components
)

Parameters

scheme  EpcScheme
 
components  String
 

Return Value

Epc
Exceptions
ExceptionCondition
EpcException if the number of components specified is not appropriate for the specified EPC scheme, if any component has inappropriate syntax, or if the resulting Epc would be invalid for any other reason.
See Also