简单的计算器问题 [英] Simple calculator problem

查看:72
本文介绍了简单的计算器问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为我的大学课程编写一个简单的计算器。但是,每次按下按钮,文本框中都不会弹出任何内容。我基于一个教程,我发现它在2010年c#编码,我使用2017 c#,所以必须有某种问题
。以下是代码。 

I am trying to code a simple calculator for my college class. However every time i push a button nothing will pop up in the textbox. I am basing it off of a tutorial i found that coded it in 2010 c# and i am using 2017 c#, so there must be some sort of problem from that. Here is the code. 

推荐答案

您是否订阅了适当点击的每种方法事件?也就是说,在Designer.cs中你有一行像

Have you subscribed each method to the appropriate click event? That is, in the Designer.cs do you have a line like

this.Zer0.Click + = new System.EventHandler(this.Zero_Click);  //这是零按钮。其他按钮应该有类似的东西。

this.Zer0.Click += new System.EventHandler(this.Zero_Click);  // This is for the Zero button. There should be something similar for the other buttons.


这篇关于简单的计算器问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆