Get Started Learning .NET / C# / VB.NET / ASP.NET

By Robbe D. Morris

Printer Friendly Version


Robbe & Melisa Morris
The moderators here at EggHeadCafe.com get a lot of requests for advice on how to get started with .NET.  My guess is that many of our readers are asking the same question.  The purpose of this article is to share our advice and some helpful links to get you off to a good start.  All links in this article will open in a new window for your convenience.
For starters, you may need help convincing management to take the plunge.  Selling Management On Migrating To .NET and Six Reasons Why Your Organization Should Migrate To The .NET Platform Now! will go a long way towards tackling this task.  Once you've got them on board, take the following steps:
 
1.Install Visual Studio .NET 2003
If you only have Visual Studio .NET 2002, you'll want to follow the instructions here: Guerilla Install Tactics for Visual Studio.NET Final.  While not required, I've found that uninstalling Visual Studio .NET 2002 completely prior to installing VS.NET 2003 to be helpful in avoiding problems.  Not everyone has experienced problems but I know a few developers did.
If you are planning on writing web applications in ASP.NET, your web server only needs to have (and only should have) the .NET Framework itself.  The current release at the time of writing is 1.1.  The redistributable can be found here: .NET Framework 1.1 Redistributable.  Make sure you turn off your virus protection software prior to installing either VS.NET (framework is installed as part of the VS.NET installation) or the framework.  Then turn it back on after installation.  If you are writing .NET Windows Forms applications, your deployment package will need to include the .NET Framework distributable mentioned above.  It is royalty free so you don't need to purchase licenses for your end users.
You'll find through reading the Quick Start tutorials below that the primary configuration file for the .NET Framework is machine.config that will be located in C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Config or C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Config depending on what your windows folder is.  This is an XML structured text file.  If you can't get certain parts of the framework to run because of permission problems, you may need to open this file in notepad and change the <processModel tag's userName attribute to System instead of its default value.
2.Review The Quick Start Samples
If you selected the default folder during installation, then you can find them here:
C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\StartHere.htm
Read the .NET overview first to get a better idea of how the framework actually works.  It is an entirely different environment and runtime that you were used to in C++ or Visual Basic 6.0 and will take a little getting used to.
3.Books
To tell you the truth, there are a ton of .NET books on the market these days but only a few worth buying.  The moderators at EggHeadCafe.com have read or reviewed about 90% of these books.  From a beginner's point of view, I think the following books are must have.
ADO.NET In A Nutshell
Programming C#
Programming ASP.NET
You can look at some of our other book reviews here: Book Reviews.  A lot of these are good if you can get your company to foot the bill.  If your company won't foot the bill, check out Amazon.com's option to buy used books.  I've bought several this way for pennies on the dollar and the books have always been in great condition.


4.Online Tutorials
The EggHeadCafe Web site contains a ton of great code samples.  The more elaborate examples can be found via the Articles tab above and the simplistic samples are available via the Tips & Tricks tab above.  Plus, if you need to ask a question, the message board moderators will do their best to help you out.  Some other great sites include : gotdotnet, asp.net, csharphelp.com, and www.msdnaa.com.
MSDN has some great free flash video presentations for VB.NET that cover a wide variety of topics for both Windows Forms applications and ASP.NET Web applications.  They can be found at Visual Basic At The Movies.
5..NET Framework Namespaces
The .NET framework can seem pretty ominous to beginners.  Sometimes it is hard to figure out which namespace a class belongs to and which classes to use in conjunction with each other.  The EggHeadCafe.com .NET Framework Class Browser can make this task a little easier.  If you'd like to see some code samples that lead into good articles on other sites, I recommend viewing our Code Snippet Index By Namespace Index.
6.Searching Google
No matter what you are trying to do, a code sample of it probably exists on the web.  But, you should always try highlighting the keyword in Visual Studio .NET and hitting F1 first.  As simple as this sounds, you'd be suprised at the number of people who post questions asking for something that is immediately found in the context sensitive help.  However, Microsoft documentation is lacking in some areas.  So, you need to learn how to search google.  If you are looking for a specific code sample in your language of choice, use this syntax in the google search box: classname and .method/event/property and "using Namespace;" (ex. DataTable and .Rows and "using System.Data;").  If possible, try to search on the most obscure method/event/property that you require information on.  Generic classnames will result in google returning a bunch of namespace and class name indexes that won't help much.  In most cases, using my search technique will return an article in the search results that contains a usable code sample.
Peter Bromberg has put together a nice macro to run inside of Visual Studio .NET to search google for you: Build a Quick Visual Studio.NET Google Search Macro.
7.ADO.NET
Database code syntax is considerablely different in ADO.NET compared to ADO.  ADO To ADO.NET Syntax Translation/Comparison Tips will help you compare classic ADO syntax with syntax to accomplish the same thing in ADO.NET.
8.Crystal Reports .NET
This product is garbage.  DataDynamics ActiveReports.NET is a far superior product.  However, if you insist on using it, then Brian Bischof is your man.  He has a great web site called www.crystalreportsbook.com where you can get answers to the mess you are about to step into along with a great book you can purchase.
9.Internet Information Services
Classic ASP developers may get a little frustrated with how Visual Studio .NET wants to force you into managing your Web site folders a certain way.  For development purposes, you'll want to set your local IIS web root to a general folder and make virtual directories for all Web sites you are developing.  For many of you, this will require some adjustment.  Trust me...Its worth not hassling with Visual Studio .NET.  If you don't follow this practice, you'll run into problems even opening up ASP.NET applications in Visual Studio .NET.  As a general rule, most developers set c:\inetpub\wwwroot as the Web root in IIS and make their virtual directories from there.  Your sites being in virtual directories does NOT mean they have to be in virtual directories on your production web server.  The primary purpose for this suggestion is make it easier to work with Visual Studio .NET and not require you to constantly change the IIS settings everytime you want to open a different ASP.NET application.  As a side note, you can adjust a particular solution or .sln file and the project or .csproj file and change where they look in order to establish their interaction with IIS.
Many developers prefer to create the IIS virtual directory first, as a folder within the solution, and then add the new web application by asking the IDE to point to it.  You could also use the technique in this article: Build an IIS Virtual Directory Addin for Visual Studio.NET .
10.SQL Server
If you also need to break into the world of SQL Server, our Flash video presentations on SQL Server Training are great for beginners.
11.Mobile Device Development
The mobile device emulator comes with Visual Studio .NET 2003.  So, you can develop your application and test it even if you don't own a device.  The single most useful link you'll found out there is the .NET Compact Framework FAQ page.  It contains a ton of links with instructions on how to do just about everything or you could just go to the Mobile and Embedded Application Developer Center home page.
12.Obfuscation
You are going to find that your compiled .NET Assemblies (dll's and exe's) can be 100% decompiled into usable source code.  If you are developing windows forms applications (and if you are selling your ASP.NET applications), you'll need to educate yourself on this topic.  Peter Bromberg can help you do just that via this product review: Remotesoft Obfuscator and Linker
13.Visual Studio .NET Intellisense
I'm sure you've already noticed that the intellisense is similar to Visual Studio of old.  However, if you are coming from the Visual Basic 6.0 world, you might not be familiar with method overloads (various ways to call the same Sub or Function).  Whenever you get intellisense for what parameters a particular method requires, take notice of the little up and down arrows next to the method name.  By clicking the arrows, you can see the different override options and pick the one that works best for you.  Some methods, particularly those dealing with GDI+, offer over ten different sets of possible parameters to pass into the same method.
 
That's it for now but we'll be adding items to this list as they come up.  Please take a moment to rate this article (opens new browser window).  Rate Article


Robbe is a 2004-2008 Microsoft MVP for C# and the .NET Evangelist for Alinean Inc..  He is also the co-founder of EggHeadCafe which provides .NET articles, book reviews, software reviews, and software download and purchase advice.