Ok, I started learning C# 5 days ago and have made very satisfactory progress. I keep struggling on silly little points but I managed to figure stuff out eventually. I wanted to have a thread whereby I can ask the experience guys on here some stuff I can't get working
I'm busy doing a project. I'm writing a ticketing system that sits on a SQL machine. I've installed the .NET framework in my 3 PC Lan and all the computers "talk" to the SQL machine. Imagine the PC's are the users ordering movie tickets, theather tickets etc. The program keeps track of how many tickets sold, what shows (there are only two),money earned and how many seats still left. It displays all the results to a datagrid and updates itself autamatically everytime a transaction is entered. It's very basic stuff and probably awful code but it works!
But, I have a silly problem. Laughable actually. I don't know how to display pennies. As in £6,23p.
My tickets cost 7.75 each, declared as integers. It refuses to display the pennies bit. Just throws an exception. I've tried double, float, decimal (which rounds it to the nearest £££). So if you use my system and pay with a tenner, you're pretty much screwed! Instead of getting back £2.25, you'll only get £2.00
I hope I explained this properly. Please be kind, 5 days experience here....
I'm busy doing a project. I'm writing a ticketing system that sits on a SQL machine. I've installed the .NET framework in my 3 PC Lan and all the computers "talk" to the SQL machine. Imagine the PC's are the users ordering movie tickets, theather tickets etc. The program keeps track of how many tickets sold, what shows (there are only two),money earned and how many seats still left. It displays all the results to a datagrid and updates itself autamatically everytime a transaction is entered. It's very basic stuff and probably awful code but it works!
But, I have a silly problem. Laughable actually. I don't know how to display pennies. As in £6,23p.
My tickets cost 7.75 each, declared as integers. It refuses to display the pennies bit. Just throws an exception. I've tried double, float, decimal (which rounds it to the nearest £££). So if you use my system and pay with a tenner, you're pretty much screwed! Instead of getting back £2.25, you'll only get £2.00
I hope I explained this properly. Please be kind, 5 days experience here....