Naming variable

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

Hi,

What is the naming convention in .NET when it comes to naming a variable
like "StudentID"? Is it "StudentID" or "StudentId"?

For variable like "myHtml", I know the "HTML" part must be "Html". But there
is some confusion when it is only 2 characters, like in "ID". Is is "ID" or
"Id"?

Not very important, but I would like to know what is the suggested Microsoft
naming convention.

Thanks.
 
I think StudentID is fine.

Check this one:
http://msdn.microsoft.com/library/d...s/cpgenref/html/cpconcapitalizationstyles.asp


Hi,

What is the naming convention in .NET when it comes to naming a variable
like "StudentID"? Is it "StudentID" or "StudentId"?

For variable like "myHtml", I know the "HTML" part must be "Html". But there
is some confusion when it is only 2 characters, like in "ID". Is is "ID" or
"Id"?

Not very important, but I would like to know what is the suggested Microsoft
naming convention.

Thanks.
 
Michael said:
What is the naming convention in .NET when it comes to naming a variable
like "StudentID"? Is it "StudentID" or "StudentId"?

For variable like "myHtml", I know the "HTML" part must be "Html". But
there is some confusion when it is only 2 characters, like in "ID". Is is
"ID" or "Id"?

Not very important, but I would like to know what is the suggested
Microsoft naming convention.

'studentID'.

BTW: *I* prefer 'StudentID'...

Naming guidelines and code conventions
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=namingconventions&lang=en>
 
Cor Ligthert said:
For me, as well StudentID although I like to avoid abbreviations

What would you use? 'StudentIdentifier'?!
 
Student.Number or when not a number Idientification probably

However let us let that too the native English speakers in this newsgroup.

:-)

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top