VB.net Tutorials

What's New in VB .NET? A comparison of VB vs VB.net

  • 2008-11-25
  • Comments
  • Steven Holzner
  • 177

Rather than asking what's new, it would almost be easier to ask what's not new in VB .NET. The changes are extensive. We can't cover all the changes from Visual Basic 6.0 in a single article, but it's worth taking a look at them in overview here, in one place, so you get an idea of how things are different.
Read More

What is .NET Framework and the Common Language Runtime?

  • 2008-11-25
  • Comments
  • Steven Holzner
  • 177

VB .NET is only one component of a revolution in Windows-the .NET framework. This framework provides the new support for software development and operating system support in Windows, and it's more extensive than anything we've seen in Windows before. The .NET framework wraps the operating system with its own code, and your VB .NET programs actually deal with .NET code instead of dealing with the operating system itself. And it is specially designed to make working with the Internet easy.
Read More

Visual Basic Statements

  • 2008-11-25
  • Comments
  • Steven Holzner
  • 177

VB Statements are execution statements that perform actions. Besides having single statements in your code, statements can also be grouped into blocks, as we'll see when we discuss conditions like the If statement, which might look like this, where I'm testing the value in the variable BankBalance to see if it's less than 0
Read More

Data types in VB.net

  • 2008-11-25
  • Comments
  • Steven Holzner
  • 177

It's time to create a new variable—but what type should you use? For that matter, exactly what kinds of variable types are there and what do they do? Even if you remember what types there are, you probably won't remember the range of possible values a particular variable type allows.
Read More

Arrays and Dynamic Arrays in VB.net

  • 2008-11-25
  • Comments
  • Steven Holzner
  • 177

It's time to start coding that database program. But wait a moment-how are you going to handle the data? It's just a simple program, so you don't want to start tangling with the full database techniques. An array would be perfect; how do you set one up?
Read More

Handling Strings in VB.net

  • 2008-11-25
  • Comments
  • Steven Holzner
  • 177

You've decided to lead the way into the future by letting your users type in sentences as commands to your program. Unfortunately, this means that you have to parse (i.e., break down to individual words) what they type. So what was that string function that lets you break a string into smaller strings again? We'll get an overview of string handling in this topic. Strings are supported by the .NET String class in Visual Basic. You declare a string this way:
Read More

Operators in VB.net

  • 2008-11-25
  • Comments
  • Steven Holzner
  • 177

Visual Basic comes with plenty of built-in operators, which let you manipulate your data. For example, here I'm adding the values in intVariable1 and intVariable2 with the addition operator, +, and storing the result in intVariable3 with the assignment operator, =:
Read More

If…Else Statements in VB.net

  • 2008-11-25
  • Comments
  • Steven Holzner
  • 177

How can you make choices in your code, deciding what to do next depending on the values in your variables? You can use the If statement, which is the bread-and-butter of Visual Basic conditionals, and which lets you evaluate your data and execute appropriate code. Here's how this statement works:
Read More

Do Loop in VB.net

  • 2008-11-25
  • Comments
  • Ramlak
  • 177

The Do loop keeps executing its enclosed statements while or until (depending on which keyword you use, While or Until) condition is true. You can also terminate a Do loop at any time with an Exit Do statement. The Do loop has two versions; you can either evaluate a condition at the beginning:
Read More

For Loop in VB.net

  • 2008-11-25
  • Comments
  • Ramlak
  • 177

The For loop is probably the most popular of all Visual Basic loops. The Do loop doesn't need aloop index, but the For loop does; a loop index counts the number of loop iterations as the loop executes. Here's the syntax for the For loop—note that you can terminate a For loop at any time with Exit For:
Read More

For Each…Next Loop in VB.net

  • 2008-11-25
  • Comments
  • Ramlak
  • 177

You use the For Each…Next loop to loop over elements in an array or a Visual Basic collection. This loop is great, because it automatically loops over all the elements in the array or collection—you don't have to worry about getting the loop indices just right to make sure you get all elements, as you do with a For loop. Here's the syntax of this loop:
Read More

While Loop in VB.net

  • 2008-11-25
  • Comments
  • Ramlak
  • 177

While loops keep looping while the condition they test remains true, so you use a While loop if you have a condition that will become false when you want to stop looping. Here's the While loop's syntax (note that you used to end this loop with Wend in VB6 and before—that's changed to End While now):
Read More

Sub Procedures and Functions in VB.net

  • 2008-11-25
  • Comments
  • Steven Holzner
  • 178

Procedures are made up of series of Visual Basic statements that, when called, are executed. After the call is finished, control returns to the statement that called the procedure. In this way, procedures make it simple for you to package your code into discrete units. Ideally, each Visual Basic procedure should handle one—and only one—task, to make this easy to remember. You can pass data to procedures and the code in the procedure can work on that data. As mentioned above, there are two types of procedures in Visual Basic .NET: Sub procedures and functions. Sub procedures do not return a value, while functions do.
Read More

Most Viewed Articles on VB.net

Latest Tutorials

Subscribe to Tutorials

Related Tutorials

Scope in VB.net

Unstructured Exception Handling in VB.net

Structured Exception Handling in VB.net

Creating Sub Procedures in VB.net

Creating Functions in VB.net

Passing a Variable Number of Arguments to Procedures in VB.net

Specifying Optional Arguments with default values in Procedures in VB.net

Preserving a Variable's Values between Procedure Calls in VB.net

Procedure Delegates in VB.net

Properties in VB.net

Understanding Scope in VB.net

Using Resume Next and Resume Line in VB.net

Using On Error GoTo 0 in VB.net

Getting an Exception's Number and Description in VB.net

Raising an Exception Intentionally in VB.net

Archived Comments

1. i want to know when we're importing a package , w
View Tutorial          By: bilal ahmad at 2013-02-14 14:11:24

2. Hibernate can be an effective framework if one app
View Tutorial          By: Giao Vu at 2011-08-03 23:40:02

3. Very Easy To Understand
View Tutorial          By: Najeeb at 2011-06-09 04:12:34

4. hi good article with explanation
View Tutorial          By: yuganthi at 2012-09-24 05:18:35

5. It's a good eg to learn join and isAlive method.Bu
View Tutorial          By: Nithin at 2012-02-02 08:43:28

6. really superb in simple english with examples. Exp
View Tutorial          By: hariharan at 2009-01-14 22:22:32

7. Whenever i run this program, it terminates immedia
View Tutorial          By: Gopi at 2015-08-19 06:55:41

8. Hi, this was useful. how can integrate j2me progra
View Tutorial          By: karthik at 2013-01-23 10:02:02

9. can u tell me mobile tracker code in j2me
w

View Tutorial          By: aiyaz at 2010-08-21 16:29:08

10. Thanks :) It works for me :)
View Tutorial          By: Milind at 2011-12-07 10:05:23