Universe Guide

Home / Facts

.NET Basics

Most people will already have known about .NET, it is Microsoft``s archictecture for future software development. Unlike previous development systems such as VB6, the source code is not compiled to pure machine code but instead it is compiled to a Pseudo Code. The Pseudo-Code is run on top of a Common Language Run-Time which converts the code into machine code. It is in a way, Microsofts attempt at copying Sun``s Java but without the ability of running on any operating system except Windows. There are a number of Linux ports such as Go-Mono with has limited Microsoft approval.

The two main languages that are available for .NET framework are C# and VB.NET . The latter has been eclipsed in popularity by C# because it is less wordy and in some peoples eyes is faster. All .NET code compiles down to the same Pseudo-Code so a program written in VB.NET is as capable to do a job as C#, there is no speed improvement in choosing C# than VB.NET. Peoples misconceptions of the speed is due to COM programs written in C++ are faster than VB6 applications but that is not the case.

C# is based on the ``C`` programming language family which also includes the languages C++ and Java. Although Java doesn``t have the letter `C` in its name, it does have the same structure as the other family members.

In VB6, variables were just that, just variables, now in C#, all variables are objects with methods and properties. Where in VB6 you would do

 Dim intLength as integer intLength = len(strText) 
You can do instead :-
 Dim intLength as integer = strText.Length 
In the above example, I``ve shown you another ease of programming style that was introduced in .NET and thats you can define a variable and set the value in the same line. That brings it into line with the `C` programing languages that contain that feature.

Another big change that has come about in .NET is that code is always compiled before it is run. In VB6, code could be debugged through an interpreter interface. In .NET you can still debug but you can``t change the code midway through the stepping through and expect the code to take account of that. You would need to stop the programme and restart it. When you conside how buggy VB6 used to be and crash on occassions of when you were debugging through, it is a sensible option.

error handling had an overhaul in .NET, whilst On Error Goto... construct is still supported, it is recommended that you use the new try..catch..throw mantra that C++ developers have been using for years.

Related Pages of Interest :-

Add a Comment

Email: (Optional)