Visual C# .NET Part 2: Compiling .NET Code - Visual Studio.NET and .NET Languages
(Page 4 of 5 )
If you have worked with Visual Studio.NET before, you will notice that I used it to generate C#, VB.NET applications which we used in our example, and I just wrote a single line of code to display “I like C# programming” to the console screen. Visual Studio.NET helps you and save your time when you write applications with Microsoft VC++.NET, VB.NET, VC#.NET. So we will use Microsoft VS.NET to write applications using any of Microsoft .NET languages.
C# Application using Command-Line Compiler
You can compile C# applications using C# Command-Line Compiler called csc (stand for, C Sharp Compiler). I will not talk too much about C# compiler now, but I will let you create and compile a simple application using this compiler. After that we will use VS.NET to create the same application (in the next section) and you will see how much time VS.NET can save. Let’s create a simple application that will ask you for your name and print a single line containing that name.
Figure 3 contains the required lines of code for our program written using Notepad. Write these lines in a Notepad file and save it with this name “test.cs”.

It is much easier to copy and paste the next lines of code into a Notepad file instead of writing it and save it directly; you will get the same code written in Figure 4.
using System;
namespace test
{
public class test
{
static void Main()
{
Console.WriteLine("Please Enter your name and press Enter");
string x = Console.ReadLine();
Console.WriteLine("{0} Likes C# Programming ",x);
Console.ReadLine();
}
}
}
Important Note: C# is a case sensitive language, which means Michael is not like michael. In other words, ‘Michael’ with the first letter ‘M’ as capital letter is a different word of ‘michael’ which begins with ‘m’ as a small letter.
Because C# is a case sensitive language, ‘using System’ is not like ‘using system’. The first one is correct, and the second one will prevent the compiler from compiling the application. So take care when you write C# code. When you read on further, you will know what you will write with capital letters and what you will write with small letters.
Next: Compiling the Application >>
More .NET Articles
More By Michael Youssef