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

naming rule(convenience) in VB.NET

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.