首页 > 其他 > 详细

C#学习笔记(3)

时间:2014-03-01 04:38:30      阅读:398      评论:0      收藏:0      [点我收藏+]
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 = "";
        }
    }
}
bubuko.com,布布扣

C#学习笔记(3),布布扣,bubuko.com

C#学习笔记(3)

原文:http://blog.csdn.net/jkxqj/article/details/20140929

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!