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.

Who is Participating?
Tapan PattanaikConnect With a Mentor Senior EngineerCommented:
hi Inglorious,

                   Check these useful links.

NET Programming Standards and Naming Conventions:

VB.NET (Naming Conventions For VB.NET 2005 ):

Naming guidelines and code conventions:

Jaime OlivaresSoftware ArchitectCommented:
There is no naming conventions at all for "mutators" and "accessors". This are known as "properties" in the .net world (any .net language).
For vb, you can define a property with "getters" and "setters" the following way:

Public Property X() As Integer
     Return x
   End Get
   Set(ByVal Value As Integer)
     x = value
   End Set
End Property

Open in new window

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 you just have to remember that unlike java & c# isn't case sensitive.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.