C# CS1513 C}预期错误

C# CS1513 C}预期错误,c#,C#,我真的知道如何编程,所以请友好点,哈哈。请原谅我的问题,我现在只是在做实验。有人能告诉我是什么引起的吗 CS1513 C# } expected 我的代码是: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication8 { class Program

我真的知道如何编程,所以请友好点,哈哈。请原谅我的问题,我现在只是在做实验。有人能告诉我是什么引起的吗

CS1513  C# } expected
我的代码是:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication8
{
    class Program
    {
        static void Main(string[] args)
        {
            string country = "USA";
            Console.WriteLine("Hello, What country are you from?");
            string countryName = Convert.ToString(Console.ReadLine());
            if (countryName == country) ;
            {
                Console.WriteLine("You are Eligable for the competition ! :-) ");
            } 
            else {
                Console.WriteLine("You are not Eligable, Sorry!!");
            }

        }
    }
}
我试图给出一个基于用户所在国家的答案

你把一个;在你的if声明之后


它应该是if countryName==country,而不是if countryName==country

取下皮肤;如果countryName==国家,则为from


第二;是语句终止符。如果countryName==country;=>如果countryName==countryOne是每个人有时都会犯的错误之一,它在哪一行告诉您发生了此错误?当您有此信息可用时,应始终包含此信息!这里给noob的教训不仅仅是分号,而是一个空语句。编译器向您发出警告,解释了问题,但您忽略了警告。这里的教训是noobs应该阅读编译器警告。我们帮你放进去的!哈哈哈,我的错。我很感激那个人。Noob错误hehHappy提供帮助,欢迎使用堆栈溢出。如果此答案或任何其他答案解决了您的问题,请将其标记为已接受。为了澄清:SEM是一个空语句,它是If语句的结果部分。