可能重复:
What is a method called if you do not use an access identifier?默认访问级别
什么是在VB.NET或C#函数的默认访问级别?
例子:
VB.NET
Function GetFoo() as Foo
Return New Foo()
End Function
C#
foo GetFoo()
{
return new Foo();
}
我知道,在默认情况下,类是私有的。如果没有指定任何成员,它是否简单地继承父级的访问级别?
在类,结构默认,和接口是'internal',不'private.' –
请不要靠近,它不是一个确切的重复。另一个问题没有提到VB。 –