Well, the error message pretty much explains itself.
Mathematics does not allow you to divide by zero, so you should probably make sure your application doesn't try to do that, wouldn't you say?
The fun bit is finding out why your application is trying at all. And - again - that's where you and Mr Debugger get to be good friends, because he's the one that tells you how the divisor came to be zero: which is pretty much essential to preventing it in future.
Seriously, get used to the debugger - it's a powerful, flexible tool that most developers spend a considerable amount of time with. It's a lot more fun - and a lot quicker - to find the information than it is to ask here. Especially as most of the time we have to say "use the debugger to get information" anyway!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
Your'e trying to get everyone here to debug your code for you. That's not going to happen.
The debugger is there to debug YOU, to give you a tool to understands how your code works, what it's really doing, to increase your understanding.
The problem with the code you have is that you didn't write it and have no idea how it's supposed to work. This is where the debugger is an indispensable tool, to better your understanding of how the code works.
Hi, does someone know how to gain exclusive control of a human interface device input stream in c#? I have a keyboard and a magnetic stripe card reader and I don't want the card reader to write outside of my application and the keyboard to write inside.
No it does not. The text editor reads from the input stream or device and receives whatever data is available from that device. The actual transfer of the data is handled by Windows responding to a device signalling that it has data available.