Aspose.BarCode.Examples.CSharp.ManageAndOptimizeBarCodeRecognition.ScanBarCodePicture.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        public static void Run()
        {
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_ManageAndOptimizeBarcodeRecognition();

            try
            {
                // Read file from directory with DecodeType.EAN13
                BarCodeReader reader = new BarCodeReader(dataDir + "Scan.jpg", DecodeType.EAN13);
                while (reader.Read())
                {
                    // Read symbology type and code text
                    Console.WriteLine("Symbology Type: " + reader.GetCodeType());
                    Console.WriteLine("CodeText: " + reader.GetCodeText());
                }
                reader.Close();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message + "\nThis example will only work if you apply a valid Aspose BarCode License. You can purchase full license or get 30 day temporary license from http://wwww.aspose.com/purchase/default.aspx.");
            }
        }
    }
ScanBarCodePicture