Visual Basic.NET
  Home arrow Visual Basic.NET arrow Learning the Visual Basic .NET Language
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Download TestComplete 
Windows Web Hosting
 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
VISUAL BASIC.NET

Learning the Visual Basic .NET Language
By: Apress Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 23
    2005-11-17

    Table of Contents:
  • Learning the Visual Basic .NET Language
  • The Evolution of VB .NET
  • Variables and Data Types
  • Arrays
  • Variable Operations
  • The String Class
  • Conditional Structures
  • Loop Structures
  • Functions and Subroutines

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    Learning the Visual Basic .NET Language
    (Page 1 of 9 )

    This article presents an overview of the Visual Basic .NET language. It is excerpted from chapter three of the book Beginning ASP.NET in VB.NET: From Novice to Professional, written by Matthew MacDonald (Apress, 2004; ISBN: 1590592786).

    BEFORE YOU CAN CREATE an ASP.NET application, you need to choose a .NET language to program it. If you’re an ASP or Visual Basic developer, the natural choice is VB .NET. If you’re a longtime Java programmer or old-hand C++ coder, C# will probably suit you best. VBScript isn’t an option—it just doesn’t have the range, flexibility, and elegance a modern language demands.

    This chapter presents an overview of the Visual Basic .NET language. You’ll learn about the data types you can use, the operations you can perform, and the code you’ll need to define functions, loops, and conditional logic. This chapter assumes that you’ve programmed before and that you’re already familiar with most of these concepts—you just need to see how they’re implemented in VB .NET.

    If you’ve programmed with an earlier version of Visual Basic, you might find that the most beneficial way to use this chapter is to browse through it without reading every section. This approach will give you a general overview of the VB .NET language. You can then return to this chapter later as a reference when needed. But remember, though you can program an ASP.NET application without mastering all the language details, this deep knowledge is often what separates the casual programmer from the legendary programming guru.


    NOTE  
    The examples in this chapter show individual lines and code snippets. You won’t actually be able to use these code snippets in an application until you’ve learned about objects and .NET types. But don’t despair—the next chapter builds on this information, fills in the gaps, and presents an ASP.NET example for you try out.

    The .NET Languages

    The .NET Framework 1.1 ships with four languages: VB .NET, C#, JScript .NET, and J#. These languages are, to a large degree, functionally equivalent. Microsoft has worked hard to eliminate language conflicts in the .NET Framework. These battles slow down adoption, distract from the core framework features, and make it difficult for the developer community to solve problems together and share solutions. According to Microsoft, choosing to program in VB .NET instead of C# is just a lifestyle choice and won’t affect the performance, interoperability, feature set, or development time of your applications. Surprisingly, this ambitious claim is essentially true.

    .NET also allows other third-party developers to release languages that are just as feature rich as VB .NET or C#. These languages (which already include Eiffel, Perl, Python, and even COBOL) “snap in” to the .NET Framework effortlessly. The secret is the special machine.config configuration file that is installed with the .NET Framework. In one of its sections, the machine.config file lists the language compilers that are currently installed.

    <!-- Other configuration settings omitted.  -->
    <compilers>
       <compiler language="c#;cs;csharp" extension=".cs" 
       type= "Microsoft.CSharp.CSharpCodeProvider, System, Version=1.0.5000.0"/>
       
    <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"  
       type=
    "Microsoft.VisualBasic.VBCodeProvider, System, Version=1.0.5000.0"/>
       
    <compiler language="js;jscript;javascript" extension=".js" 
       type= "Microsoft.JScript.JScriptCodeProvider, Microsoft.JScript,
       Version=7.0.5000.0"/>
       
    <compiler language="VJ#;VJS;VJSharp" extension=".jsl" 
       type= "Microsoft.VJSharp.VJSharpCodeProvider, VJSharpCodeProvider,
       Version=7.0.5000.0"/>
    </compilers>


    TIP  
    To view the machine.config file, look for the directory [WinDir]\ Microsoft.NET\Framework\[Version]\Config. For example, after installing .NET 1.1 on a Windows XP computer, the machine.config file is placed in the directory C:\Windows\Microsoft.NET\Framework\v1.1.4322\Config.

    To install another .NET language, all you need to do is copy the compiler to your computer and add a line to the machine.config file. (Typically, a setup program will perform these steps for you automatically.) The new compiler will then transform your code creations into a sequence of IL (Intermediate Language) instructions.

    IL is the only “language” that the CLR recognizes. When you create the code for an ASP.NET web form, it’s changed into IL using the VB .NET compiler (vbc.exe), the C# compiler (csc.exe), the JScript compiler (jsc.exe), or the J# compiler (vjc.exe). You can perform the compilation manually or let ASP.NET handle it automatically when a web page is requested. We’ll discuss the difference between these two techniques in Chapter 5.

    More Visual Basic.NET Articles
    More By Apress Publishing


       · This article is an excerpt from the book "Beginning ASP.NET in VB.NET: From Novice...
     

    Buy this book now. This article is excerpted from chapter three of the book Beginning ASP.NET in VB.NET: From Novice to Professional, written by Matthew MacDonald (Apress, 2004; ISBN: 1590592786). Check it out at your favorite bookstore today. Buy this book now.

    VISUAL BASIC.NET ARTICLES

    - Types of Operators in Visual Basic
    - Operators
    - Understanding Custom Events using Visual Bas...
    - Polymorphism using Abstract Classes in Visua...
    - Shadowing using Shadows in Visual Basic.NET ...
    - Overloading and Overriding in Visual Basic.N...
    - More on Controlling Windows Fax Services Usi...
    - Programmatically Controlling Windows Fax Ser...
    - Focusing on Forms and Menus in Visual Basic
    - Manipulating Forms with the Windows Forms Li...
    - Basics of the Windows Forms Library
    - Forms, Controls, and Other Useful Objects
    - Implementing OOP to Develop Database Oriente...
    - Using Themes and Skins for Personalization w...
    - A Deeper Look at Personalization using Visua...

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway