VB.net Tutorials

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

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

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
  • 153232

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
  • 153245

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
  • 153239

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
  • 153501

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
  • 153270

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
  • 153269

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
  • 153277

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
  • 153241

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
  • 153424

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
  • 153273

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
  • 153292

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
  • 153432

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. Your Crystal report viewer showing all the records
View Tutorial          By: Neel at 2013-06-09 15:02:15

2. Why not a simple array list of threads?
wha

View Tutorial          By: Ranadheer Machineni at 2011-08-18 12:30:35

3. Thnks, such a basic example to understand. Keep it
View Tutorial          By: Pradeep Singh at 2012-10-11 04:24:54

4. really very good example .now i have cleared what
View Tutorial          By: pushpendra bansal gurjar at 2012-02-15 12:19:58

5. To install 32 bit java Communication API you can f
View Tutorial          By: Shailendra at 2013-04-06 14:49:44

6. /* File name : Employee.java */
public abst

View Tutorial          By: Anonymous at 2012-11-16 12:23:17

7. Hi, I used your fix and it looks like it worked fi
View Tutorial          By: Eddie at 2011-02-21 18:41:06

8. hi everbody. i need to extract a output from one j
View Tutorial          By: keerthi at 2010-10-29 13:38:28

9. sir i m getting chat server started bt how a clien
View Tutorial          By: ashu at 2010-11-02 08:13:00

10. Nothing that hasn't been said before, but I wasn't
View Tutorial          By: Calvin at 2010-03-22 20:43:10