0
Expected unqualified-id before 'public'
using System; public class MainClass { public static void Main() { string yourName; Console.WriteLine("What is your name? "); yourName = Console.ReadLine() ; Console.WriteLine("Hello{0},yourName") ; } } It keeps showing me expected unqualified-id before 'public'
2 Réponses
+ 1
You need to include a namespace too, also your Main() function should include the start parameters (shown below). Here is the starting template:
using System;
namespace Sololearn
{
class Program
{
static void Main(string[] args)
{
}
}
}
+ 1
Thanks