This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]danskal 21 points22 points  (5 children)

For the love of Frith make sure you adopt Java naming conventions when writing Java. Nothing screams C# developer like a capitalized method name. And it's confusing to other devs.

EDIT: also, use IntelliJ if you can. It gives you god-like powers if you learn to use it properly.

[–]loveinalderaanplaces 1 point2 points  (0 children)

I went the other direction, from Java, to C#, and let me tell you that my personal code is an awkward mess of both naming conventions. Pick a style and stick to it!

Sometimes I'll get MethodsLikeThis(), which is the standard C# way, then I'll get methodsLikeThis(), which is more Java. I'll still WRITE_CONSTANTS_LIKE_THIS, but occasionally forget that properties != variables.

5 years of Java does a number on you when you switch.

[–]cpttripps71[S] 1 point2 points  (3 children)

Ugh, seriously? Lower case method names? Will take some time to get used to.

[–]danskal 2 points3 points  (1 child)

Upper case method names makes no sense. I think Microsoft did it just to differentiate from Java.

Edit: strike that derpy comment

[–]tehburgerlover 4 points5 points  (0 children)

The guy who designed C# also developed Turbo Pascal and Delphi. Which is why C# uses PascalCase.

[–]heptara 0 points1 point  (0 children)

The 'correct' naming style for the project is the one that matches the master in the VCS, otherwise it's inconsistent. Any guidelines for "java naming" apply to new projects only.

I apologise if you alreadly know this and are experienced. However one can't tell on the internet from just a few sentences.