473,396 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Naming variable

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.
Nov 21 '05 #1
6 1056
I think StudentID is fine.

Check this one:
http://msdn.microsoft.com/library/de...tionstyles.asp
"Michael" <mi*****@nospam.com> wrote in message
news:uB**************@tk2msftngp13.phx.gbl...
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.

Nov 21 '05 #2
You're right. Thanks Shiva.
"Shiva" <sh******@online.excite.com> wrote in message
news:er*************@TK2MSFTNGP12.phx.gbl...
I think StudentID is fine.

Check this one:
http://msdn.microsoft.com/library/de...tionstyles.asp
"Michael" <mi*****@nospam.com> wrote in message
news:uB**************@tk2msftngp13.phx.gbl...
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.

Nov 21 '05 #3
"Michael" <mi*****@nospam.com> schrieb:
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>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #4
BTW: *I* prefer 'StudentID'...

For me, as well StudentID although I like to avoid abbreviations

Cor
Nov 21 '05 #5
"Cor Ligthert" <no************@planet.nl> schrieb:
BTW: *I* prefer 'StudentID'...

For me, as well StudentID although I like to avoid abbreviations


What would you use? 'StudentIdentifier'?!

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #6
Student.Number or when not a number Idientification probably

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

:-)

Cor
"Herfried K. Wagner [MVP]" <hi***************@gmx.at>
"Cor Ligthert" <no************@planet.nl> schrieb:
BTW: *I* prefer 'StudentID'...

For me, as well StudentID although I like to avoid abbreviations


What would you use? 'StudentIdentifier'?!

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: VK | last post by:
09/30/03 Phil Powell posted his "Radio buttons do not appear checked" question. This question led to a long discussion about the naming rules applying to variables, objects, methods and properties...
5
by: Ted | last post by:
I'm trying to come up with naming conventions for my company as we move to C#. I'm looking through the Naming Guidelines section on MSDN, but I'm unable to find a recommendation for class scope...
4
by: Mark Broadbent | last post by:
stupid question time again to most of you experts but this is something that continually bothers me. I am trying to get into the habit of naming variables and controls in an assembly as per...
10
by: Allan Ebdrup | last post by:
We have a developer who has defined our vraiable naming conventions, He has defined that variables should benamed the same as the class they are an instance of, for example: ...
3
by: Phillip Conrad | last post by:
Here is a little problem I've run into, and none of the naming conventions have helped... Ever since I switched from C to C# and FxCop, I've going crazy trying to fix some style issues. I have 3...
114
by: Jonathan Wood | last post by:
I was just wondering what naming convention most of you use for class variables. Underscore, "m_" prefix, camel case, capitalized, etc? Has one style emerged as the most popular? Thanks for...
35
by: Smithers | last post by:
Is it common practise to begin the name of form classes with "frm" (e.g., frmOneForm, frmAnotherForm). Or is that generally considered an outdated convention? If not "frm" what is a common or...
17
by: Control Freq | last post by:
Hi, Not sure if this is the right NG for this, but, is there a convention for the variable names of a Session variable? I am using .NET 2.0 in C#. I am new to all this .NET stuff, So, any...
17
by: Miguel Guedes | last post by:
Hello, Does anyone have a link to the C++ Standard Library naming conventions that they could share? I have found a few links to pages on C++ naming conventions but am unsure as to what standard...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.