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 private
for methods. So this:
private void Foo()
{
}
is equivalent to
void Foo()
{
}
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 internal
by default, whereas nested types are private
by default.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With