473,403 Members | 2,222 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,403 software developers and data experts.

naming rule(convenience) in VB.NET

Hi,
I didn't found any naming rules in VB.NET, like using i or int as prefix when declaring an integer variable.
Could anyone tell me about this?

thanks.

william

Nov 22 '05 #1
3 2017
This has really become more of a preference and less of a standard over the
last few years. The most important thing is to be consistent with whatever
you do.

I personally don't prefix variables but I do use Hungarian naming notation
with controls
(http://msdn.microsoft.com/library/de...-us/dnvsgen/ht
ml/hunganotat.asp).
"william" <an*******@discussions.microsoft.com> wrote in message
news:41**********************************@microsof t.com...
Hi,
I didn't found any naming rules in VB.NET, like using i or int as prefix when declaring an integer variable. Could anyone tell me about this?

thanks.

william

Nov 22 '05 #2
This has really become more of a preference and less of a standard over the
last few years. The most important thing is to be consistent with whatever
you do.

I personally don't prefix variables but I do use Hungarian naming notation
with controls
(http://msdn.microsoft.com/library/de...-us/dnvsgen/ht
ml/hunganotat.asp).
"william" <an*******@discussions.microsoft.com> wrote in message
news:41**********************************@microsof t.com...
Hi,
I didn't found any naming rules in VB.NET, like using i or int as prefix when declaring an integer variable. Could anyone tell me about this?

thanks.

william

Nov 22 '05 #3
William,
As scott stated, this is largely personal preference. I find its "Best" to
be consistent within a project, solution, team, department, enterprise...

For the most part I follow the guidelines at:
http://msdn.microsoft.com/library/de...Guidelines.asp

Which means that I rarely use prefixes. I'm mixed on using them on controls
or not, seeing as Controls are private, it really doesn't matter, if they
adhere to the above guidelines.

The one deviation from the Guidelines that I use is that fields declared at
the module, class, structure level are prefixed with m_ (for member). As you
cannot have a field & property share the same name, except for case as you
can in C#. Oddly enough controls rarely get the m_, weird huh? ;-)

Hope this helps
Jay

"william" <an*******@discussions.microsoft.com> wrote in message
news:41**********************************@microsof t.com...
Hi,
I didn't found any naming rules in VB.NET, like using i or int as prefix when declaring an integer variable. Could anyone tell me about this?

thanks.

william

Nov 22 '05 #4

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

Similar topics

7
by: michael | last post by:
Hello, Apologies if this seems like a trivial question, but it would help me with my python, coming from a Java background. What is the preferred naming convention for a .py file, that...
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...
2
by: william | last post by:
Hi, I didn't found any naming rules in VB.NET, like using i or int as prefix when declaring an integer variable. Could anyone tell me about this? thanks. william
6
by: alexandre damiron | last post by:
Did anyone tried dynamic variable naming in Js, like the ${$varname} feature of PHP ? It would easier a long DOM generation, for example to place such a code portion into a loop .... ...
4
by: aling | last post by:
What's the rule of default argument of function in C++? I found that the default argument of function could not necessary be a constant value. Is it true? Previously I thought that the default...
7
by: Martin Eisenberg | last post by:
I have a class that holds a sequence of data items. Modifying those items is the sole domain of the class itself. However, the user has read access to the data, e.g. to gather statistics. This...
13
by: Edward Gregor | last post by:
In C, if I want similar names for typename and variable, is there any good way you can recommend me to do that? For example, I have a struct containing a region, which I have named it,...
0
by: JosAH | last post by:
Greetings, welcome back at the sequel of the parsers article chapter. This part is dedicated to the ExpressionParser, the largest parser class for our little language. This class parses a...
0
by: JosAH | last post by:
Greetings, this week's article part discusses the parsers used for our little language. We will implement the parsers according to the grammar rules we defined in the second part of this...
14
by: MartinRinehart | last post by:
Working on parser for my language, I see that all classes (Token, Production, Statement, ...) have one thing in common. They all maintain start and stop positions in the source text. So it seems...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.