Class HIBCLICPrimaryDataCodetext
Namespace: Aspose.BarCode.ComplexBarcode
Assembly: Aspose.BarCode.dll (25.4.0)
Class for encoding and decoding the text embedded in the HIBC LIC code which stores primary data.
public class HIBCLICPrimaryDataCodetext : HIBCLICComplexCodetext, IComplexCodetext
Inheritance
object ← HIBCLICComplexCodetext ← HIBCLICPrimaryDataCodetext
Implements
Inherited Members
HIBCLICComplexCodetext.GetConstructedCodetext() , HIBCLICComplexCodetext.InitFromString(string) , HIBCLICComplexCodetext.GetBarcodeType() , HIBCLICComplexCodetext.BarcodeType , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
This sample shows how to encode and decode HIBC LIC using HIBCLICPrimaryDataCodetext.
HIBCLICPrimaryDataCodetext complexCodetext = new HIBCLICPrimaryDataCodetext();
complexCodetext.BarcodeType = EncodeTypes.HIBCQRLIC;
complexCodetext.Data = new PrimaryData();
complexCodetext.Data.ProductOrCatalogNumber = "12345";
complexCodetext.Data.LabelerIdentificationCode = "A999";
complexCodetext.Data.UnitOfMeasureID = 1;
using (ComplexBarcodeGenerator generator = new ComplexBarcodeGenerator(complexCodetext))
{
Bitmap image = generator.GenerateBarCodeImage();
using (BarCodeReader reader = new BarCodeReader(image, DecodeType.HIBCQRLIC))
{
reader.ReadBarCodes();
string codetext = reader.FoundBarCodes[0].CodeText;
HIBCLICPrimaryDataCodetext result = (HIBCLICPrimaryDataCodetext)ComplexCodetextReader.TryDecodeHIBCLIC(codetext);
Console.WriteLine("Product or catalog number: " + result.Data.ProductOrCatalogNumber);
Console.WriteLine("Labeler identification code: " + result.Data.LabelerIdentificationCode);
Console.WriteLine("Unit of measure ID: " + result.Data.UnitOfMeasureID);
}
}
Constructors
HIBCLICPrimaryDataCodetext()
public HIBCLICPrimaryDataCodetext()
Properties
Data
Identifies primary data.
public PrimaryData Data { get; set; }
Property Value
Methods
Equals(object)
Returns a value indicating whether this instance is equal to a specified Aspose.BarCode.ComplexBarcode.HIBCLICPrimaryDataCodetext value.
public override bool Equals(object obj)
Parameters
obj
object
An Aspose.BarCode.ComplexBarcode.HIBCLICPrimaryDataCodetext value to compare to this instance.
Returns
true if obj has the same value as this instance; otherwise, false.
GetConstructedCodetext()
Constructs codetext
public override string GetConstructedCodetext()
Returns
Constructed codetext
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
A 32-bit signed integer hash code.
InitFromString(string)
Initializes instance from constructed codetext.
public override void InitFromString(string constructedCodetext)
Parameters
constructedCodetext
string
Constructed codetext.