才写第一个c#文件就运行不了,提示找不到源文件要怎么解决
using System;
namespace RectangleAppLication
{
class Rectangle
{
double width;
double length;
public void Acceptdetails()
{
width = 3.5;
length = 4.5;
}
public double GetArea()
{
return width * length;
}
public void display()
{
Console.WriteLine("width:{0}", width);
Console.WriteLine("length:{0}", length);
Console.WriteLine("area:{0}", GetArea());
}
class AssemblyInfo
{
static void Main(string[] args)
{
Rectangle r = new Rectangle();
r.Acceptdetails();
r.display();
r.GetArea();
Console.ReadLine();
}
}
}
}
重新创建下项目,项目不要放在中文路径里,用缺省值
中->英:判断的任务是
a)判断目前是否是中->英模式,若不是则弹出窗口提示
b)判断单词是否拼写正确,若不正确则在ListBox中添加错词
c)展现所有单词信息,清空拼写单词文本框
d)裁决边界
具体代码如下
private void button3_Click(object sender, EventArgs e)
{
try
{
if(test_model == 0)
MessageBox.Show("当前是 ”英->中“ 模式,请先切换模式!", "Warn");
else
{
ShowAll(words[t1]);
textBox1.Text = null;
if (textBox1.Text != words[t1].English)
this.listBox1.Items.Add(words[t1].number + ":" + words[t1].English + ":" + Convert.ToString(words[t1].numoferror));
}
}
catch
{
JudgeofBounds();
}
}