C# style guide

  • Thread starter Thread starter Jon
  • Start date Start date
J

Jon

A while ago, I found a Microsoft document that had suggestions for naming variables, classes, etc
(eg whether to name them starting with a lower case or upper case letter).

I can't locate this document. Does anyone have a link?
 
There are lots of versions running around.  But, maybe this one is the one  
you're looking for:http://msdn.microsoft.com/en-us/library/ms229002.aspx

The most comprehensive guideline for designing .NET APIs (which
includes style among other things) that I know of is the book titled
"Framework Design Guidelines: Conventions, Idioms, and Patterns for
Reusable .NET Libraries". 2nd edition of that covers .NET 3.5:

http://www.amazon.com/Framework-Design-Guidelines-Conventions-Development/dp/0321545613

It includes everything in the MSDN naming guide as a subset, but
there's a lot more there (e.g. choosing between class and struct, or
between abstract class and interface, when to use and when not to use
nested classes, and so on). Both authors are Microsofties, and
Krzysztof in particular is PM for the .NET Framework team.
 
There are lots of versions running around.  But, maybe this one is the one  
you're looking for:http://msdn.microsoft.com/en-us/library/ms229002.aspx

The most comprehensive guideline for designing .NET APIs (which
includes style among other things) that I know of is the book titled
"Framework Design Guidelines: Conventions, Idioms, and Patterns for
Reusable .NET Libraries". 2nd edition of that covers .NET 3.5:

http://www.amazon.com/Framework-Design-Guidelines-Conventions-Development/dp/0321545613

It includes everything in the MSDN naming guide as a subset, but
there's a lot more there (e.g. choosing between class and struct, or
between abstract class and interface, when to use and when not to use
nested classes, and so on). Both authors are Microsofties, and
Krzysztof in particular is PM for the .NET Framework team.
 
Hillbilly,

There is a lot of rubbish on Internet, even rubbish that is intentioned to
lead you in the wrong direction.

I find it very clever from Jon to ask this in a newsgroup where persons have
already filtered that rubbish.

jmo

Cor
 
Hillbilly,

There is a lot of rubbish on Internet, even rubbish that is intentioned to
lead you in the wrong direction.

I find it very clever from Jon to ask this in a newsgroup where persons have
already filtered that rubbish.

jmo

Cor
 
Well said. I find it puzzling that some people now jump on others for
asking questions, in a newsgroup, that are precisely on topic for the
newsgroup. If newsgroups aren't for discussion, what are they for?

I agree...to a point. When I actually ask a question in a newsgroup it is
because I have ALREADY tried to find the answer via Web searches (usually
with Google) and have either run into the "rubbish" that Cor mentioned or
found nothing at all. It's not unreasonable to expect someone to at least
lift a finger to try to find the info on his own before posting to a
newsgroup.

That said, I tried a search with keywords from the author's original post:
"c# style guide naming variables microsoft" and did not get the MSDN link to
the design guidelines that others posted, at least not on the first few
pages.
 
Well said. I find it puzzling that some people now jump on others for
asking questions, in a newsgroup, that are precisely on topic for the
newsgroup. If newsgroups aren't for discussion, what are they for?

I agree...to a point. When I actually ask a question in a newsgroup it is
because I have ALREADY tried to find the answer via Web searches (usually
with Google) and have either run into the "rubbish" that Cor mentioned or
found nothing at all. It's not unreasonable to expect someone to at least
lift a finger to try to find the info on his own before posting to a
newsgroup.

That said, I tried a search with keywords from the author's original post:
"c# style guide naming variables microsoft" and did not get the MSDN link to
the design guidelines that others posted, at least not on the first few
pages.
 
Hi,

Sorry I have't got back on this. I thought the thread was fininished and have just found out that
there were lots of other replies.

I did actually do various google searches before asking the question. I think the problem was that I
was using the wrong keywords. I got all sorts of style guides by other people, but not the Microsoft
one.

Microsoft call it ".NET Framework Developer's Guide - Design Guidelines for Developing Class
Libraries" which I guess is why Google didn't find it.

Thanks everyone else for your suggestions,

Jon


Jon, Jon, Jon, did they ban you from google again?
 
Hi,

Sorry I have't got back on this. I thought the thread was fininished and have just found out that
there were lots of other replies.

I did actually do various google searches before asking the question. I think the problem was that I
was using the wrong keywords. I got all sorts of style guides by other people, but not the Microsoft
one.

Microsoft call it ".NET Framework Developer's Guide - Design Guidelines for Developing Class
Libraries" which I guess is why Google didn't find it.

Thanks everyone else for your suggestions,

Jon


Jon, Jon, Jon, did they ban you from google again?
 
Back
Top