【实例简介】
【实例截图】
【核心代码】
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Calculator
{
public partial class Form1 : Form
{
string str, opp, opp1;
double num1, num2, result;
public Form1()
{
InitializeComponent();
}
private void number(object sender, EventArgs e)
{
Button b = (Button)(sender);
str = b.Text;
if (txtOutput.Text == "0")
{
txtOutput.Text = str;
}
else
txtOutput.Text = txtOutput.Text