public class Class1
{
private object field;
public Class1(Class1 class1)
{
this.field = class1.field;
}
private void Func(Class1 class1)
{
this.field = class1.field;
}
}
This code compiles and works. But why? I always thought that private members are only accessible within the class scope. Also MSDN says so:
The private keyword is a member access modifier. Private access is the least permissive access level. Private members are accessible only within the body of the class or the struct in which they are declared