remove all the statements after the console application c# ends code example
Example: c# clear console read chache
while(Console.KeyAvailable)
{
Console.ReadKey(true);
}
while(Console.KeyAvailable)
{
Console.ReadKey(true);
}