How to Run C# program on Notepad using Visual studio Command Prompt

By
Hi Friends! today i am going to explain "How to Run C# program on Notepad  "We Generally Run C# programs using Visual studio IDE. It is easy process to Run the c# program. A Good programmer runs his programs on Notepad because he does not take any help through IDE (e.g.Visual studio).He can run the program without using any tools.If you want to Run the program on Notepad then you have to good knowledge in programming (e.g. Syntax , Datatype ,input and output steams etc.).Now i am going to print  Rectangle star(*) using c#.
There are some steps to implement (Run) this concepts on Notepad Which are given below:-
Step 1:- First open Your Notepad -->Write a program to print a rectangle using c# as shown below:-
using System;

namespace ConsoleApplication
{
    class Program
    {
        static void Main(string[] args)
        {
             Console.WriteLine("Welcome to mani:your traingle is Below:-");
            for (int i = 0; i < 5; i++)
            {

                for (int j = i; j < 5; j++)

                    Console.Write('*');

              Console.WriteLine();
            }
            Console.WriteLine();
            Console.ReadLine();
        }
    }
}

Step 2:- Now save the Notepad program in any drive with .cs extension (i have saved in D:/ Drive --> raj Folder --> ram.cs file ) as shown below:-


programfile

Step 3:- Now open Visual studio Command prompt from start Menu-->first give the drive path(ex-D: PRESS ENTER) -->Compile the program->csc->space-> foldername \ filename.cs (e.g. csc raj\ram.cs) -->you will see one .exe file(ram.exe) generated in your Drive as shown below:-


file


Step 4:- Now Run the program as filename.exe (ram.exe) as shown below:-


run Notepad


 I hope this Helpful for you
For More...
  1. Reflection in c#
  2. Generic collection in c#
  3. Event in c#
  4. Delegate in c#
  5. Structure an class in c#
  6. Properties in c#
  7. Multiple main method in c#
  8. Constructor and Destructor in c#
  9. oops concepts in c#
  10. How to insert data in xml file

You can directly Run this program  by visual studio Command prompt after download below files
                               Download

3 comments:

  1. Very Clear Article. Helped me and worked perfectly.

    ReplyDelete
  2. It is nice, thanks. I have an application with visual studio 2015 written in C# with MS access 2007 database. I want to run the application in another computer without visual studio bearing the database through pendrive(removal disk). Is it possible?

    ReplyDelete

Powered by Blogger.