I tend to look at the entire method signature when I read code. If I don't see an access modifier (public
, protected
, internal
, protected internal
) then I can assume it's private
(although I try to be explicit about access modifiers).
You are free to adopt your own convention though - particularly for private
methods.
There's one case I can think of where the convention is useful: when using C#'s implicit method group conversion syntax. Consider this class, Test
:
public class Test {
public event EventHandler MyEvent;
}
If I create a private method for handling MyEvent
and add the handler using C#'s implicit method group conversion syntax a lowercase method name could be confused with a field or variable:
Test test = new Test();
test.MyEvent += myEventHandler;
private void myEventHandler(object sender, EventArgs e) {
...
}