Hacker News new | ask | show | jobs
by profquail 6141 days ago
I don't think there's a universal way, but what I usually do is:

- For private class fields, I use an underscore with camelcase, starting with a lowercase letter, e.g.:

private static int _id = 12345;

- For public class fields, properties, methods, etc. I use camelcase, starting with an uppercase letter, e.g.:

public double Determinant() ...

- For method parameters, I use camelcase, starting with a lowercase letter, e.g.:

public void Foo(int bar, ref string helloThere)

I think this is also the style that Microsoft uses internally, and it makes it easy to see where your variables came from.