欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

C# QRBarCode

程序员文章站 2023-11-07 15:52:34
1. install-package barcode -v 4.0.2.2; 2. ......

1. install-package barcode -v 4.0.2.2;

2.

using ironbarcode; 
 class program
    {         
        static void main(string[] args)
        {
            barcodedemo();
            console.readline();
        }

        static void barcodedemo()
        {
            string barcodemsg = "be bold and make a difference!";
            generatedbarcode mybarcode =barcodewriter.createbarcode(barcodemsg, barcodewriterencoding.qrcode);
            string picturefilepath = datetime.now.tostring("yyyymmddhhmmssffff") + ".jpg";
            mybarcode.saveaspng(picturefilepath);
            system.diagnostics.process.start(picturefilepath);                       
        }
}

C# QRBarCode