C# FAQ 3 - Getting Started With C#

C# is one of the powerful programming languages originally launched in 2001 with subsequent releases once in every two years. Microsoft releases a new version of .NET Framework as and when updated Visual Studio is released. Before the official release, Microsoft provides an opportunity for developers to submit feedback based on preview releases.
 
Microsoft adds several new features as and when they release new versions, which ultimately improve the productivity of developers reducing the overall development time. With the help of C#, you will be able to develop powerful Windows and Web based applications in addition to ASP.NET MVC and Windows Phone apps.
 
As discussed in the previous FAQ, Visual Studio enables developers to build and deploy applications very easily. You can develop C# applications with the help of Visual Studio. Visual Studio Standard Edition is available free of cost, which will be useful for beginners who don't have access to full blown version. Microsoft also provides trial version of Visual Studio in addition to Visual Studio Online.
 
Here are my previous C# FAQ articles:
 
 
Microsoft .NET Framework consist of Common Language Runtime (CLR) and Class Libraries. The CLR is a universal execution engine which is required for running a compiled C# program. CLR also provides support for Managed Code, Effective Memory Management, Type Safety Verification, Conversion of IL to native code, Structured Exception Handling and much more. For instance, the garbage collector helps in memory allocation.
 
When you compile a C# program, set of Meta codes called Intermediate Language is generated. The code contains information about code types, its members and references. You can view the generated code using Ildasm.exe tool, which is included with .NET Framework. I will discuss more about this tool in the next FAQ.
 
Namespaces are the core part in C#. They consist of group of classes, types or assemblies, which contain several methods. In short, namespaces are regarded as umbrella for all classes. You have to call the relevant namespace depending upon the nature of the application being developed.
 
For instance, if your application makes use of database, you need to call System.Data namespace. However, you need to specifically provide reference to System namespace since this is the root of all other namespaces. Namespaces should be called in your C# program by the keyword - using as shown below: 
  1. using System;  
  2. using System.Data;  
Syntaxes in C# are case sensitive. Hence, you should provide the required namespaces including semicolon correctly. However, Visual Basic syntaxes are not case sensitive. If you have access to Visual Studio, namespaces are either automatically generated or will be displayed with the help of IntelliSense.
 
Some of the important namespaces provided by .NET Framework are given below:
  1. System.Collections  
  2. System.Data  
  3. System.Data.OracleClient  
  4. System.Diagnostics  
  5. System.Drawing  
  6. System.Drawing.Drawing2D  
  7. System.Drawing.Printing  
  8. System.Windows.Forms   
  9. System.IO  
  10. System.Net  
  11. System.Reflection  
  12. System.Runtime.InteropServices  
  13. System.Runtime.Remoting  
  14. System.Security  
  15. System.Threading  
  16. System.Web  

In the next FAQ, you will learn the steps required to create and run first C# program.


Similar Articles