C# Program to Open Command Prompt Mode with Code

This is the C# program to open the command prompt mode with C# code. CMD can also be open by
go to Start--> in run type "cmd" --> cmd.exe will appear in the list click and open it.

Source Code   

using System;
using System.Collections.Generic;
using System.Text;
namespace assad
{
class openConsole

{

static void Main(string[] args)
{
welcomeScrean();
Console.WriteLine("Press any Key to open new Console . . . ");
Console.ReadKey();
System.Diagnostics.Process.Start("cmd.exe");
Console.ReadKey();
}
private static void welcomeScrean()
{
Console.ForegroundColor = ConsoleColor.Green;
Console.Write("\t*******************************************************" + "\n"
+ "\t*******************************************************" + "\n"
+ "\t** Open Console **" + "\n"
+ "\t** Program **" + "\n"
+ "\t*******************************************************" + "\n"
+ "\t*******************************************************\n\n\n\n");
}

}
}

Output of the Program 

C# Program to Open Command Prompt Mode with Code

Share on Google Plus

About Asad

Asad Niazi is Software Engineer , Programmer, Web Developer and a young mentor of BloggersTown and PProgramming. Asad Love to writes about Technology, Programming, Blogging and make money online.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment