我有一个静态成员:
namespace MyLibrary
{
public static class MyClass
{
public static string MyMember;
}
}
我希望您能像这样访问:
需要访问的内容:
using MyLibrary;
namespace MyApp
{
class Program
{
static void Main(string[] args)
{
MyMember = "Some value.";
}
}
}
如何通过添加
using MyLibrary
,使得 MyMember
在不使用 MyClass.
的情况下可以被 MyApp
访问?
MyClass.MyMember = "一些值"
。 - p.s.w.g