| Start |
|---|
| Intellisense Helper One interesting thing is the ability to add you own comments into Visual Studio Intellisense. So you can make your own written functions and classes self-explanatory. To do so, you must type the comment symbol three times the line above your function. Once done, Visual Studio will automatically add an XML documentation : After that, if you type in your Test function somewhere in your code, this little help will show up : |
| Declaring a Variable In VB.NET, every variable must be declared before it is used (If Option Explicit (opens new window) is set to On). There are two ways of declaring variables:
See this answer (opens new window) for full details about
These variables (also called fields in this context) will be accessible for each instance of the These fields can also be declared with |
| Comments The first interesting thing to know is how to write comments. In VB .NET, you write a comment by writing an apostrophe ' or writing |
| Modifiers Modifiers are a way to indicate how external objects can access an object's data.
Means any object can access this without restriction
Means only the declaring object can access and view this
Means only the declaring object and any object that inherits from it can access and view this.
Means only the delcaring object, any object that inherits from it and any object in the same namespace can access and view this. |
| Writing a function A function is a block of code that will be called several times during the execution. Instead of writing the same piece of code again and again, one can write this code inside a function and call that function whenever it is needed. A function :
A Function Name, could be used as the return statement is just the same as |
Object Initializers Is equivalent to Although similar Each member can be preceded by the Two anonymous instance defined with the same members (name, type, presence of Anonymous types are structurally equatable. Two instance of the same anonymous types having at least one Both Named and Anonymous types initializer can be nested and mixed |
Collection Initializer Is equivalent to Items can be the result of a constructor, a method call, a property access. It can also be mixed with Object initializer. It is not possible to use Object initializer syntax AND collection initializer syntax for the same object at the same time. For example, these won't work We can also allow collection initializer syntax by providing for a custom type. If we wanted to add Person object to a |
Read Article
https://develop.horje.com/learn/1434/reference