Apostrophe Systems EPC Generator 2.0

DoD Constructor (Int32, Int32, Int32)

Constructs an DoD Size and number of serial numbers to generate.

public DoD(
   int size,
   int startingSerialNumber,
   int totalSerialNumbers
);

Parameters

size
96 OR 64
startingSerialNumber
Serial Number to start with
totalSerialNumbers
Number of SerialNumbers to Generate. see GetNext

Remarks

This constructor should be used if the caller wishes to use the GetNext method.

Example

Example of using this constructor and the GetNext method.

 DoD next = new DoD(64,0,10);
 //Set the CAGE ,Fitler, and set a Serial Number of Zero
 next.Encode("1D381",1,0);
 while(next.GetNext()) {
     Console.WriteLine(next.ToTagURI());
}
 //Results would be
 urn:epc:tag:usdod-64:01.1D381.0
 urn:epc:tag:usdod-64:01.1D381.1
 urn:epc:tag:usdod-64:01.1D381.2
 urn:epc:tag:usdod-64:01.1D381.3
 urn:epc:tag:usdod-64:01.1D381.4
 urn:epc:tag:usdod-64:01.1D381.5
 urn:epc:tag:usdod-64:01.1D381.6
 urn:epc:tag:usdod-64:01.1D381.7
 urn:epc:tag:usdod-64:01.1D381.8
 urn:epc:tag:usdod-64:01.1D381.9
 urn:epc:tag:usdod-64:01.1D381.10

See Also

DoD Class | Apostrophe.EPC Namespace | DoD Constructor Overload List