6 solutions

Solution 2

Barcode is just a language like English.
Means I can say it just contain string or integer or mixed. But if you want to use it to identify your product, then you have to create one unique ID for each which will lead to product and it's price.

Means you just have to store your Product ID in barcode Language. And whenever you read your barcode it will provide a Product ID and then you have to Code in your Software to fetch the Name and it's price.

You can get helps how to create barcode (and ya reading is just very simple, it just types the ID in textbox when you press a button to read) on CodeProject.