I do not know what a method without an access identifier is called. In this code block, I am referring to the void updateNumTo5 method.
private int num = 0;
#region public methods
public int Get7()
{
return 7;
}
#endregion
#region private methods
private int get6()
{
return 6;
}
#endregion
#region Unknown name
void updateNumTo5()
{
num = 5;
}
#endregion
The default access modifier (not identifier) is
privatefor methods. So this:is equivalent to
The general rule is that the default access modifier is always the most restricted you could specify it as. So for example, non-nested types are
internalby default, whereas nested types areprivateby default.