The SGTIN Class will translate a GTIN to an SGTIN.
For a list of all members of this type, see SGTIN Members.
System.Object
Apostrophe.EPC.EPCBase
Apostrophe.EPC.SGTIN
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
//Create a 96 Bit SGTIN
SGTIN sgtin = new SGTIN(96);
//Provide the GTIN-14, a Filter and a Serial Number
string result = sgtin.Encode("10075720000814",3,3);
//result will equal 3074049F2061BC4000000003
//Now Decode the EPC Number
string decoded = sgtin.Decode(result);
Console.Write(decoded);
//Decoded HEX Number returns. Notice the Indicator Digit, 1, in front of the Item Reference. Keep this in mind when decoding an SGTIN
/*
<Tag name='SGTIN' size='96'>
<Fields>
<Field name='Header' value='48'/>
<Field name='Filter' value='3'/>
<Field name='Partition' value='5'/>
<Field name='CompanyPrefix' value='0075720'/>
<Field name='ItemReference' value='100081'/>
<Field name='SerialNumber' value='3'/>
</Fields>
</Tag>
*/
Namespace: Apostrophe.EPC
Assembly: Apostrophe.EPC (in Apostrophe.EPC.dll)
SGTIN Members | Apostrophe.EPC Namespace