C# Barcode Generator for Code 2 of 5 Creation
|
Symbology | Value | Symbology Sample Code in C# | ![]() |
Code 2 of 5 | Code 2 of 5 |
|
Symbology Value | Symbology Character Set | Input Digits Account |
Code 2 of 5 |
|
Variable length |
C# code of encoding data to Code 2 of 5 barcode using C# barcode creating API
Property Name Sample Code Data
BarCode barcode = new BarCode();
barcode.Symbology = Symbology.Code2of5;
barcode.Data = "987654321";
Property | Value Type | Default Value | Property Description | Sample Code |
UOM | UnitOfMeasure | Pixel | The unit of measure; Options: Pixel Cm Inch |
BarCode barcode = new BarCode(); barcode.Symbology = Symbology.Code2of5; |
BarcodeImageWidth | float | 0 | Barcode image width |
|
BarcodeImageHeight | float | 0 | Barcode image height |
|
X | float | 2 | Width of module in unit of measure |
|
Y | float | 75 | Height of module in unit of measure |
|
AutoResize | bool | false | - |
|
MarginTop | float | 0 | Top margin width of the barcode image in unit of measure |
BarCode barcode = new BarCode(); barcode.Symbology = Symbology.Code2of5; barcode.Data = "987654321"; |
MarginBottom | float | 0 | Bottom margin width of the barcode image in unit of measure | |
MarginLeft | float | 0 | Left margin width of the barcode image in unit of measure | |
MarginRight | float | 0 | Right margin width of the barcode image in unit of measure |
Code 2 of 5 has wide bars and narrow bars. The ratio of the width of wide bar to that of narrow bar is defined by property N. N = wide bar width / narrow bar width. | ![]() |
Property | Value Type | Default Value | Property Description | Sample Code |
N | float | 2.0f | N = wide bar width / narrow bar width | BarCode barcode = new BarCode(); barcode.Symbology = Symbology.Code2of5; barcode.Data = "1"; barcode.N = 1.5f; |
The following Code 2of5 barcode integration and creation information links relate to this product that may be of interest to you: