用C#语言编一个能进行两个数加减乘除的计算器

来源:百度知道 编辑:UC知道 时间:2024/05/31 06:44:47
不用那么复杂 就用几个方法 调用
注意是在控制台里面写的
用一个using System

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace A0
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private double a=0;
private double b=0;
private string stroper="=";
bool blclear=true,blopen=true;

private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.Button button7;
private System.Windows.Forms.Button button8;
private System.Windows.Forms.Button button9;
private System.Windows.Forms.TextBox textBox1;