Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
Node is saved as draft in My Content >> Draft
  • Running C# program in CommandPrompt

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 47
    Comment on it

    If you don't want to compile you program in the  .NET IDE you can do it from the command prompt.

     

    Just follow these steps to do that

     

    Step 1 : First open the notepad from typing Windows+R

     

    Then type notepad on it .

     

    After that type the C# code over it

     

    using System;
     
    namespace Chapter1
    {
      class Program
       {
         static void Main(string[] args)
          {
            Console.WriteLine("This is my First C# Program");
          }
       }
    }

     

     

    Step 2: Now save the program as Demo.cs. You must choose All Files in save as type box.

     

    Step 3: Go to Start > All Programs > Microsoft Visual Studio 2005 or 2008 > Visual Studio Tools > Visual Studio 2005 or 2008 Command Prompt.

     

    Step 4: Set Path in command prompt where your Demo.cs file is saved. Here we are using D:/Csharp>

     

    Step 5: Now compile your program by following command:

     

    csc Demo.cs

     

     

    Just type name of the program in command prompt.

     

     

    .net

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: