using System;
namespace it2b_project_01
{
static class class1
{
static public class1()
{
InitializeComponent();
}
public static void error_check(object sender, EventArgs e)
{
}
}
}
不同的.cs文件
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 it2b_project_01
{
public partial class Create_an_Order : Form
{
public Create_an_Order()
{
InitializeComponent();
}
private void Create_an_Order_Load(object sender, EventArgs e)
{
}
private void Order_Button_Submit_Click(object sender, EventArgs e)
{
class1.error_check();
}
}
}
创建一个Order.cs(26,13):错误CS0103:在当前上下文中不存在class1的名称。