Click here to Skip to main content
15,886,063 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
Hello. i need a help to create a program with C#, which will work like calculator.
User will be able to multiply,subtract, add and so on. It will be even possible to zero it, i mean press a key and everything dissapears.

Implement it in Windows-forms instead of in Console.


I have tried with following, but i of course did not really manage with it.

with best regards Behruz


C#
string number1=Console.ReadLine();
int number1Int=int.Parse(number1);
string number2=Console.ReadLine();
int number2Int=int.Parse(number2);
int answer=number1Int*number2Int;
Console.WriteLine(answer);
Console.ReadLine();
Posted
Comments
[no name] 25-Aug-12 13:28pm    
If you needed a Winforms application, why did you do a console? And, of course, "did not really manage with it" does not describe any kind of a problem.

A simple calculator is a simple program to code. Anyway you have to grasp the fundamentals of Windows Forms application development, in order to code it.
Google is your friend: Windows Forms development tutorial[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900