Developing in .Net
Visual Basic is the language
Visual Studio is the tool

Visual Basic Language
Visual Basic 2005 and C# 2005 are identical in their ability to produce high quality applications
Biggest difference is syntax
C# 2005 was designed for C and C++ programmers
VB 2005 was designed for existing VB programmers
VB compiler creates IL Intermediate Language code
C# compiler creates IL Intermediate Language code
This is how .net can accommodate multiple languages
Any code written to run in the CLR is called managed code
At runtime the CLR compiles the IL code on the fly using JIT Just in time compiler
Only converts code needed to run
Visual Basic is now a full object-oriented language
It can do anything C# can do
Earlier versions of Visual Basic were not as good as C++ and other languages. For this reason some people still underestimate its ability.
Differences:
C# provides the ability to write unsafe code
Unsafe code uses pointers to manage and access memory directly.
Is not recommended because memory cannot be removed by garbage collection
Can cause memory leaks
VB provides late binding
Allows you to create a variable as a type of Object and later assign it to a variable by assigning it to an object instance or using createObject function

Common Type System
In order for .Net to support all programming languages the data types must all be the same
2 categories of types
- value types
- always has a value
- very efficient
- take up little memory
- the actual value of the variable is passed
- integer
- boolean
- float
- reference types
- can be null
- when you pass a reference type, a copy is made of the reference to the object
2 project types for Windows applications
- Windows Applications
- Creates a stand-alone EXE application
- Windows Control Library
- Creates a DLL that you can use in other EXE applications
When you build a form in the IDE, Visual Studio generates the same code that you would have to write by hand
When you add a form to a windows application, Visual Studio creates a customized form class
A form and its controls are always created and configured through code, even when you design it with the IDE
Do Not try to edit this code that Visual Studio creates for you.
To prevent this VB uses partial classes
Partial classes allow you to split a class definition into more than one file
When compiled they are all assembled into one class
VS separates the code into two parts
- The code part you write
- The code VS generates to build the form and add the controls at design time
It adds two files
- Test.vb- with your code
- Test.Designer.vb-with the automatically generated code
To view this you must show hidden files
Project | Show All Files
Then click the plus sign next to your form
Look in here to see how it works but do not change this code
Do not add code, even comments