Hi , this is my first code I wrote for thecalculator
double operand2=0;
bool iscurrentOperand;
private void btnNumeric_Click(objectsender,EventArgs e)
{
Button button=(Button)sender;
txtSow.Text+=button.Text;
iscurrentOp=true;
}
private voidbtnOperations_Click(object sender,EventArgs e)
if (Operand!=0){
operand2=double.Parse(txtSow.Text);
switch(currentOp){
case "+":
txtSow.Text=(Operand + operand2).ToString();
break;
case "-":
txtSow.Text=(Operand- operand2).ToString();
case "*":
txtSow.Text=(Operand * operand2).ToString();
else{
currentOp=button.Text
Operand=Convert.ToDouble(txtSow.Text);
private void btnEqual_Click(objectsender,EventArgs e)
switch(currentOp)
case "+"
txtSow.Text=(Operand +double.Parse(txSow.Text)).ToString();
case "-"
txtSow.Text=(Operand -double.Parse(txSow.Text)).ToString();
case "*"
txtSow.Text=(Operand *double.Parse(txSow.Text)).ToString();
case "/"
txtSow.Text=(Operand /double.Parse(txSow.Text)).ToString();