新学c#帮忙看下出先
using System;using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
namespace js
{
/// <summary>
/// Description of MainForm.
/// </summary>
public partial class MainForm : Form
{
public MainForm()
{
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
//
// TODO: Add constructor code after the InitializeComponent() call.
//
}
void MainFormLoad(object sender, EventArgs e)
{
int a,b,y;
a=13; b=14;
y=Max(a,b);
textBox1.Text=y.ToString;
}
}
}
private int Max(int n1,int n2)
{
if (n1>n2)
{
return n1;
}
else
{
return n2;
}
}
用sharpdevelop 写的 运行的时候出现 Expected class, delegate, enum, interface, or struct (CS1518)