var code = "Hello, QRCode";
var hints = new Dictionary();
hints.Add(EncodeHintType.CHARACTER_SET, "UTF-8");
hints.Add(EncodeHintType.MARGIN, 2);
var qrWriter = new QRCodeWriter();
var result = qrWriter.encode(code, BarcodeFormat.QR_CODE, 200, 200, hints);
var writer = new BarcodeWriter() { Format = BarcodeFormat.QR_CODE };
var bitmap = writer.Write(result);
var ms = new System.IO.MemoryStream();
var img = System.Drawing.Image.FromHbitmap(bitmap.GetHbitmap());
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
ms.Close();
System.IO.File.WriteAllBytes("qrcode.png", ms.ToArray());