The code for the same is:
-Downdload DLL
here
-include reference:
using MessagingToolkit.QRCode.Codec;
using MessagingToolkit.QRCode.Codec.Data;
to generate barcode from image:
string url = textBox1.Text;
QRCodeEncoder enc = new QRCodeEncoder();
Bitmap qrcode = enc.Encode(url);
pictureBox1.Image = qrcode as Image;
and to decode
QRCodeDecoder dec = new QRCodeDecoder();
textBox2.Text = (dec.decode(new QRCodeBitmapImage(pictureBox1.Image as Bitmap)));