.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  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
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

    - Using CrystalReportViewer to Display Crystal...
    - Creating Summary .Net Crystal Reports
    - More on Commands, Input and the WPF
    - Grouping and Aggregating When Querying LINQ ...
    - Commands, Input and the WPF
    - Keyboard and Ink Input with WPF
    - Mouse Input and the WPF
    - Input with Windows Presentation Foundation
    - Introducing LINQ with XML and Databases
    - An Introduction to LINQ
    - Querying LINQ to SQL: Basics
    - Completing a Simple Storefront with LINQ
    - Knowing Your Environment: the System.Environ...
    - Creating the Home Page for a Simple Storefro...
    - LINQ Quickly with Language Integrated Queries

     
    Best Practices for Windows Vista Migration Presentation
    Dell and Microsoft recently held a series of face-to-face seminars entitled, &qu....

     
    Creating a Culture for Code Reuse
    If you oversee development teams you know that like it or not proprietary and ex....

     
    Keys to Web Application Acceleration: Advances in Delivery Systems
    Accelerate Web apps by up to 5x. Ensure significantly faster access to the Web a....

     
    Optimizing Application Monitoring
    Tired of finding out from your customers that you're offline? This white paper e....

     
    Solaris to Solaris Migration -- Migrating applications from Sun SPARC to Dell PowerEdge R900
    This comprehensive Migration Guide reviews the approach that Principled Technolo....

     




    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
    Stay green...Green IT