Apostrophe Systems EPC Generator 2.0

EPCBase.GetFieldValue Method 

Gets the Value of an EPC Code field

public string GetFieldValue(
   string fieldName
);

Parameters

fieldName
Name of the EPC Field

Return Value

Value of the EPC Code Field

Exceptions

Exception Type Condition
EPCException Will throw this exception if an exception occurs while getting the value of a field

Example

This example shows how to get the Filter Value after parsing an EPC Number.

SGLN sgln = new SGLN(64);
//Encode the SGLN
 string epcNumber = sgln.Encode(1,"0652642123458",3,54321);
//Parse the EPC Number
 SGLN parsedSGLN = (SGLN)EPCBase.Parse(epcNumber);
//Get the Filter Value    
 string filter = parsedSGLN.GetFieldValue("Filter");
You can get any field of the EPC Number using this method. To Get a list of available fields see the Fields property.

See Also

EPCBase Class | Apostrophe.EPC Namespace