これを変換する方法を少し試してみました。これを Windows フォームでどのようにキャストしますか?
通常のコンソール アプリケーションのようには動作しないようです....
これがばかげているように見える場合は申し訳ありませんが、理解できません。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication3
{
public partial class Form1 : Form
{
float input1 = 0;
float input2 = 0;
float output = 0;
int c = 0;
public Form1()
{
InitializeComponent();
}
private void button10_Click(object sender, EventArgs e)
{
textBox1.AppendText("0");
}
private void button11_Click(object sender, EventArgs e)
{
textBox1.Clear();
}
private void button17_Click(object sender, EventArgs e)
{
textBox1 = output;
}
private void button12_Click(object sender, EventArgs e)
{
switch(c)
{
case '+':
output = input1 + input2;
break;
}
}