Friday, May 10, 2013

VB.NET Syntax AND Features


Syntax
We can use DIM statement to declare Variable and strings
e.g Dim mynum As String = "Hello .NET"
Now mynum Has been Assigned to Hello .NET   
if we want to show this on MessageBox We Simply use MsgBox(mynum)  
Question And Answers: 
Q: How To make Function on vb.net
Ans: it is Very simple to make Function in vb.net 
e.g 
Public Function Add(byval num1 as integer, byval num2 as integer)
       Return num1 + num2
End Funtion
Explaination
 Function Should be public or private 
You can use this function by typing this
Add(25,25)
Output should be 50
Strong Features Of VB.net
Vb.NET s an object-oriented computer programming language implemented on the .NET Framework. Although it is an evolution of classic Visual Basic language, it is not backwards-compatible with VB6, and any code written in the old version does not compile under VB.NET.
Like all other .NET languages, VB.NET has complete support for object-oriented concepts. Everything in VB.NET is an object, including all of the primitive types (Short, Integer, Long, String, Boolean, etc.) and user defined types, events, and even assemblies. All objects inherits from the base class Object.
VB.NET is implemented of Microsoft's .NET framework. Therefore it has full access all the libraries in the .Net Framework. It's also possible to run VB.NET programs on Mono, the open-source alternative to .NET, not only under Windows, but even Linux or Mac OSX.
The following reasons make VB.Net a widely used professional language:
  • Modern, general purpose.
  • Object oriented.
  • Component oriented.
  • Easy to learn.
  • Structured language.
  • It produces efficient programs.
  • It can be compiled on a variety of computer platforms.
  • Part of .Net Framework.

Strong Programming Features VB.Net

VB.Net has numerous strong programming features that make it endearing to multitude of programmers worldwide. Let us mention some of these features:
  • Boolean Conditions
  • Automatic Garbage Collection
  • Standard Library
  • Assembly Versioning
  • Properties and Events
  • Delegates and Events Management
  • Easy to use Generics
  • Indexers
  • Conditional Compilation
  • Simple Multithreading

 

 

No comments:

Post a Comment