Hello Friends,
I am getting error as 'Console' does not exist in the current context' while creating an application in visual studio ?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Shweta LodhaPosted Mar 3, 2014, 4:17 PM
even I didn't found any issue with your code. I hope you are using the correct template for console application. Apart from this, I can't see any issue with your code :(
leelhaPosted Mar 4, 2014, 1:49 PM
@Vulpes: while copying code here, I missed the braces, but in actual code i have all the paired braces.
@Shweta: thanks for providing me the pointer. Actulaly I am new to application developemnt. The VS version i was using was not having Console application template. So, I thought that I need to create it from scratch.
Abhay ShankerPosted Mar 3, 2014, 11:55 PM
using System;
VulpesPosted Mar 3, 2014, 4:29 PM
using System;
namespace myNamespace{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("welcome");
Console.ReadLine();
}
}
}
leelhaPosted Mar 3, 2014, 4:16 PM
Hi Shweta,
Yes it is console application and code is very simple.
namespace myNamespace{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("welcome");
Console.ReadLine();
}
Shweta LodhaPosted Mar 3, 2014, 3:17 PM
Are you working on console application ? If possible, please post your code.