naming rule(convenience) in VB.NET

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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/default.asp?url=/library/en-us/dnvsgen/ht
ml/hunganotat.asp).


william said:
Hi,
I didn't found any naming rules in VB.NET, like using i or int as prefix
when declaring an integer variable.
 
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/d...ef/html/cpconNETFrameworkDesignGuidelines.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 said:
Hi,
I didn't found any naming rules in VB.NET, like using i or int as prefix
when declaring an integer variable.
 
Back
Top