By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,384 Members | 845 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,384 IT Pros & Developers. It's quick & easy.

Coding Conventions from Microsoft

P: n/a
Hi.

I am starting a new project with C#. I am searching for "good" coding
conventions. I know that there are some coding conventions from microsoft,
(but they are very extensive and not clear). In the example programs of
Microsoft they use different coding conventions:
private members sometimes with underscore, sometimes without; when calling
a method sometimes: method(param1, param2) or method ( param1, param2)
(with or without blanks), ...

What should I do. Is there a way to get the internal coding conventions of
Microsoft, if there are some?

Thanks for any comment.
Nov 15 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
> What should I do. Is there a way to get the internal coding
conventions of Microsoft, if there are some?


I guess read the stuff on this page:
http://msdn.microsoft.com/library/de...guidelines.asp

called:
.NET Framework General Reference

Design Guidelines for Class Library Developers
And draw your own conclussions, what works for you and your team.
regard hjm
Nov 15 '05 #2

P: n/a
On Thu, 18 Sep 2003 09:08:15 +0200, caviar wrote:
What should I do. Is there a way to get the internal coding
conventions of Microsoft, if there are some?


I guess read the stuff on this page:
http://msdn.microsoft.com/library/de...guidelines.asp

called:
.NET Framework General Reference

Design Guidelines for Class Library Developers
And draw your own conclussions, what works for you and your team.
regard hjm


Thanks ...

but I would need a compact form.
Does anyone have such a document.

Thanks.
Nov 15 '05 #3

P: n/a
Hi,

Create one your self, I'm of the opinion that the best convention is the one
that your group feel confortable with and that is enforce in the entire
project , you could include a document with the project especification
detailing what the conventions are.

Also create UML models for your classes and the interactions among them,
these are of more values than any document you can write.

Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Ralph Lund" <no****@nomail.com> wrote in message
news:m5*****************************@40tude.net...
Hi.

I am starting a new project with C#. I am searching for "good" coding
conventions. I know that there are some coding conventions from microsoft,
(but they are very extensive and not clear). In the example programs of
Microsoft they use different coding conventions:
private members sometimes with underscore, sometimes without; when calling
a method sometimes: method(param1, param2) or method ( param1, param2)
(with or without blanks), ...

What should I do. Is there a way to get the internal coding conventions of
Microsoft, if there are some?

Thanks for any comment.

Nov 15 '05 #4

P: n/a
Uhm. Just how compact? I mean, you've been offered a comprehensive
document explaining alot of information, yet you reject it as too long
or too verbose? I don't understand how you can ask for something that
might end up becoming what amounts to a "corporate standard" for you
without being willing to do some reading, a little research and some
personal extrapolation from the data you have at your disposal.

So essentially what you're asking for is for someone to give you a
complete coding standards styling document in a few sentences? Without
learning the pros and cons of a variety of different stylings on your
own?

Do you need help at the urinel, too?

Ralph Lund <no****@nomail.com> wrote in message news:<bo*****************************@40tude.net>. ..

but I would need a compact form.
Does anyone have such a document.

Thanks.

Nov 15 '05 #5

P: n/a

Thank you Ignacio for your hints.

A problem is to use foreign source code, which does not follow "my" coding
conventions, like some source code from Microsoft (or some other company).

I am searching for a template, which I can adapt.

Thanks.
Nov 15 '05 #6

P: n/a

Uhm. Just how compact? I mean, you've been offered a comprehensive
document explaining alot of information, yet you reject it as too long
or too verbose? One document? Are you talking about the same thing as I do? If you are
searching for some convention during coding, you want to search in a single
document and not in a link collection. That's my opinion! I am searching
for something like the Java Coding Conventions - short, simple, one
document. I think the coding conventions (link collection) of Microsoft is
a overkill and not absolutely clear.

I don't understand how you can ask for something that
might end up becoming what amounts to a "corporate standard" for you
without being willing to do some reading, a little research and some
personal extrapolation from the data you have at your disposal. I have been reading a lot (belonging to this subject). Did I told you that
I haven't? Did I told you that I didn't research. So why do you think so?

So essentially what you're asking for is for someone to give you a
complete coding standards styling document in a few sentences? Without
learning the pros and cons of a variety of different stylings on your
own? I don't asked for coding standards in a few sentences - I asked for a place
where I can find some. I am searching for a template, which I can adapt. I
think there are pros and cons of every style - I have my own experiences
with coding styles, but I think a good way to create new coding standards
is to adapt an existing document. I know that I have to do this, I asked
for a template, nothing more!

Do you need help at the urinel, too?

This is a really nice comment. I asked a reliable question (in my opinion),
and get such an answer from you? Moderate your twang!

Thanks for your unNICE answer!!!
Nov 15 '05 #7

P: n/a
Hi Ralph,

If you use code from other company, or even from your own company that is
external to your project you will have several different convention or even,
no convention at all in several cases :)

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Ralph Lund" <no****@nomail.com> wrote in message
news:1t*******************************@40tude.net. ..

Thank you Ignacio for your hints.

A problem is to use foreign source code, which does not follow "my" coding
conventions, like some source code from Microsoft (or some other company).

I am searching for a template, which I can adapt.

Thanks.

Nov 15 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.