Daniel Hunt

Daniel Hunt

  • NA
  • 14
  • 4.6k

New Project in Visual Studio giving Error - Beginner

May 1 2018 10:41 PM
Thanks.
 
I am running simple code in ConsoleApp2 (New Project). The code and error are below.  I don't understand what I need to do, any help is appreciated!
 
Code:
 
using System;
namespace ConsoleApp2
{
class SimpleExample
{
static void Declarations(string[] args)
{
int a;
int b = 2, c = 3;
a = 1;
Console.WriteLine(a + b + c);
}
}
}
 
 
Error:
 
Severity Code Description Project File Line Suppression State
Error CS5001 Program does not contain a static 'Main' method suitable for an entry point ConsoleApp2 C:\Users\admin\source\repos\ConsoleApp2\ConsoleApp2\CSC 1 Active
 

Answers (2)