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.
0 Comment(s)