Home > Article > Backend Development > What is the difference between vb.net and vb?
What is the difference between vb.net and vb? vb.net adds many features of vb and evolves into a fully object-oriented programming language. The following article will compare vb.net and vb, and introduce the differences between vb.net and vb. I hope it will be helpful to everyone.
The difference between vb.net and vb
1. vb.net is a completely object-oriented programming language with abstraction and encapsulation , polymorphism, inheritance, overloading, interface shared member constructors and other features; while VB does not support inheritance.
2. Different error handling
In vb, there are only On Error....goto and On Errer Resume Next. These errors are called unstructured exception handling. The structured exception handling mechanism used in vb.net is try...catch....finally control. Its structure type is as follows:
try
'Code that may cause an exception
catch
'Code that handles exceptions when an exception occurs
Finally
'Clean up the scene
End try
Try statement block is used to throw exceptions. If an exception occurs, handle it in the Catch statement block. Finaly statement blocks are optional and are particularly useful when resources need to be released.
3. The forms generated by the two are different
VB.NET has two new form methods: Windows Forms and Web Forms. VB.NET allows the creation of different types of applications, for example, ASP.NET and ASP.NET Web service applications can be created, and also allows the creation of console applications and applications that run as desktop services.
Different from this, VB can only create Windows Forms.
4. There are differences in database access
vb6.0 implements database access through ADO (Active X Data Objext). vb.net accesses the database through ADO.NET 5. Differences in operation
VB.NET provides flexible reading and writing file functions, and multiple methods can be used to obtain the same result.
5. VB and VB.NET are also very different in control properties.
For more related knowledge, please pay attention to PHP Chinese website! !
The above is the detailed content of What is the difference between vb.net and vb?. For more information, please follow other related articles on the PHP Chinese website!