//圖片路徑 string imgPath = @"D:\barcode.png"; //解碼通用類 IBarcodeReader reader = new BarcodeReader(); Bitmap bmp = new Bitmap(imgPath); Result result = reader.Decode(bmp); bmp.Dispose(); if (result != null) { string text = result.Text; //條碼內容 string foramt = result.BarcodeFormat.ToString(); //條碼類型 }