c#不可访问,因为它受保护级别限制;
namespace test
{
class Class1
{
public static void hs()
{
Process.Start("d:\\");
}
}
}
生成dll后在另一个工程中调用如下:
using test;
namespace testdll
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Class1.hs();
}
}
}
出现“test.Class1”不可访问,因为它受保护级别限制;
如何解决?