Q:

how to use bar code reader in c# windows application?

I want to create windows application in c# that can work with bar code reader.
I want following feature to be add in my windows application:
-> Details of Product should be fill up automatically in form when bar code reader scanned correct bar code of product.

A:

There are (at least) two types of bar code readers:

working as keyboard input
working on Serial Port

So the first one is really easy. Just plug in your reader to your computer, put the cursor on your TextBox and read barcode. As it works as keyboard input, the code will automatically fill your TextBox. There may be line break at the end of read (it depends on reader and/or its settings).
This works out of the box. The problem is that your textBox MUST HAVE focus.
Other type is ComPort. This is great if you want more functionality (or don't want to have focus on control). But needs more work. But C# has a class to do that: https://msdn.microsoft.com/pl-pl/library/system.io.ports.serialport(v=vs.110).aspx
You will need to set some things like baudrate, parity bits, port name (COM1, COM2, etc). It's more complicated but the question is about how to do it - not about COM ports. So I am not writing about COM ports.

