Main Site Documentation

C# Naming Conventions


#1

Could you please use the Microsoft naming guidelines: http://msdn.microsoft.com/en-us/library/ms229045.aspx in the SDK ?

Underscores are ugly : StartCDC_WithDebugging :stuck_out_tongue:

I realize it’s too late for the existing APIs but you could use them for the new ones


#2

That is a very good suggestion.


#3

This has been bugging me as well. I’d like to see the existing API done with MS’s best practices in mind.


#4

I believe your suggestion is very good. But maybe it is late for the existing libraries.


#5

Put Foekie on the job and Fezzer.com will be updated by this evening :slight_smile:


#6

The problem is that customers have already implemented the current naming convention in their program. If it get’s changed, that will mess up. Doesn’t VS have a tool to correct that?


#7

I don’t think so, at least not I am aware of in VS Express.

GHI could, however, use the revised names while including legacy references (either directly in the class, or with a set of extension methods separately referenced).


#8

There is the obsolete attribute. You could eventually get rid of the old names in a few turns of the crank.


#9

“Could you please use the Microsoft naming guidelines”

Thank you!. And hope others remember no lower case (i.e. java ) first char method names or properties or classes.


#10

This is something that bugs me as well haha. Unfortunately once introduced into closed source libraries it can be difficult to remove (or take quite a few iterations of code to do so).

Chris, you’re thinking of the refactor tool in VS, which can rename all references - but only in projects you have loaded. So this would do nothing for customer libraries.