Inglorious
asked on
Function/sub naming conventions
Hey guys,
I come from a java background and I'm wondering about naming conventions used in subs/functions in .Net suite, mainly VB.Net
For the mutators i'm used to: setSomething() {}
Accessors: getSomeData() {}
Booleans: isSomethingSetToTrue() {}
This doesn't quite work in VB.Net, mostly because I never really worked with .Net controls.
I come from a java background and I'm wondering about naming conventions used in subs/functions in .Net suite, mainly VB.Net
For the mutators i'm used to: setSomething() {}
Accessors: getSomeData() {}
Booleans: isSomethingSetToTrue() {}
This doesn't quite work in VB.Net, mostly because I never really worked with .Net controls.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Personally I like the first set of conventions listed - they work in both VB & C# and I find the code very readable sticking to those - but as always with naming conventions - its mostly personal preference and the discussions usually get a little heated :)
The conventions your used to should work in VB.net you just have to remember that unlike java & c# vb.net isn't case sensitive.
The conventions your used to should work in VB.net you just have to remember that unlike java & c# vb.net isn't case sensitive.
For vb, you can define a property with "getters" and "setters" the following way:
Tutorial: http://www.vbdotnetheaven.com/Uploadfile/rajeshvs/PropertiesInVbDotNet04192005060237AM/PropertiesInVbDotNet.aspx
Open in new window