public partial class Form1 : Form
{
Course[] csharp = new Course[5];
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
Test c1 = new Test("Quiz",
new DateTime(2012, 6, 6), 86);
Test c2 = new Test("Mid-Term",
new DateTime(2012, 5, 6), 90);
Test c3 = new Test("Final",
new DateTime(2012, 4, 6), 87);
Test c4 = new Test("Quiz",
new DateTime(2012, 3, 6), 100);
Test c5 = new Test("Quiz",
new DateTime(2012, 2, 6), 66);
}
}
如何将我的测试c5添加到我的对象数组csharp?我想为三个对象添加五个测试类型。请帮助我在初学者水平。持有值的对象。我需要添加五个测试到我的对象
这是功课吗? –
您不能将“Test”类型的对象添加到“Course”类型的数组中。 – Nailuj
我需要用五个测试来填充课程对象,同时使用具有三个字段的测试课程。 –