C#学习笔记(3)

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 demo3
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            double inNum = Convert.ToDouble(textBox1.Text.Trim());
            double inCost = Convert.ToDouble(textBox2.Text.Trim());
            double inSale = Convert.ToDouble(textBox3.Text.Trim());
            double nowNum = inNum - inSale;
            double SaleMoney = inCost * inSale;

            label6.Text = Convert.ToString(nowNum);
            label7.Text = Convert.ToString(SaleMoney);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            textBox1.Text = textBox2.Text = textBox3.Text = label6.Text = label7.Text = "";
        }
    }
}
C#学习笔记(3)
上一篇:为什么微服务一定要有网关?


下一篇:剥开比原看代码16:比原是如何通过/list-transactions显示交易信息的