How to write a command like "pause" to console

People I'm new to C# and I want to ask (if someone could help)

How to convert a code like this (in C++) to C#:

#include<iostream>
#include "stdafx.h"
#include "test.h"
using namespace std;

int main()
{
cout<<"Helllo";
system("pause"); //This one :)
return 0;
}




Answer this question

How to write a command like "pause" to console

  • techbd

    Console.ReadLine()

    Will this work or am I missing something


  • platysternon

    Hi,

    create new console project in VS.NET, add the following code to the main method:
    System.Diagnostics.Process.Start("pause");



  • Ronnell

    Hi

    In C# the Code can be written like this using Console Applications :-

  • How to write a command like "pause" to console