what is the dot mark?

desperateboy

Active member
Joined
Dec 11, 2007
Messages
30
Programming Experience
Beginner
hi
We always use dot mark in vb.net.What exactlt it means?
Like if we write this statement
Actgrpcmd.CommandType = CommandType.StoredProcedure

Any suggestions?
 
It's how the language is written, and how it is interpreted by the compiler. It's the same with some languages use of {} while we use sub - end sub (generated). It is just a definition for how to write code. When you write regular text you use punctuation, this is a rule of the language. Found this quote about languages:
A language is a set of valid sentences. What makes a sentence valid? You can break validity down into two things: syntax and semantics. The term syntax refers to grammatical structure whereas the term semantics refers to the meaning of the vocabulary symbols arranged with that structure.
So the 'dot' here is syntax.

This syntax also help the intellisense engine in code editor provide qualified suggestions when you write code.
 
The dot operator is used in object-oriented programming. It separates the namespace from the class from the method. For example:

System.Console.WriteLine()

System is the namespace,
Console is the class,
WriteLine is the method.

If the namespace is understood, then only one dot is required between the class and the method.
 
Back
Top