.NET
  Home arrow .NET arrow Page 4 - Visual C# .NET Part 2: Compiling .NET Code
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
.NET

Visual C# .NET Part 2: Compiling .NET Code
By: Michael Youssef
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 47
    2004-06-02

    Table of Contents:
  • Visual C# .NET Part 2: Compiling .NET Code
  • Managed Code vs. Unmanaged Code
  • .NET Framework and .NET Languages
  • Visual Studio.NET and .NET Languages
  • Compiling the Application

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    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.

    More .NET Articles
    More By Michael Youssef


     

    .NET ARTICLES

    - Building Applications with Windows Workflow ...
    - Building the Data and Business Layers Using ...
    - The Transformed XML Explorer in MFC
    - List Control and Property Grid with the MFC ...
    - Font, Shell and Masked Edit Controls for MFC
    - Color, Link and Image Editor Controls for M...
    - New Controls for MFC
    - The Windows Ribbon Framework
    - Markup Language for the Ribbon Framework
    - Visually Upgrade Your MFC Project
    - New Features for the Statusbar in MFC
    - Working with the Statusbar in MFC
    - Iron Speed Design v60 Review
    - Binary and XML Serialization
    - Using CrystalReportViewer to Display Crystal...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek