C# 语法错误,似乎没什么问题

C# 语法错误,似乎没什么问题,c#,syntax-error,C#,Syntax Error,错误: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.IO; namespace SchoolPasswordLockFolder { public class Program { public static void Main(string[] args)

错误:

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

namespace SchoolPasswordLockFolder
{
    public class Program
    {
        public static void Main(string[] args)
        {
           Console.WriteLine("Enter the password: "); // the space character after the semicolon has an error
            public string input = Console.ReadLine();

        }
    }
}
(对于分号后的一个) 及

(最后一个括号) 我已经很长时间没有用C语言编程了,因为我忙于web开发和lua…

改变这个:

Severity    Code    Description Project File    Line
Error   CS1022  Type or namespace definition, or end-of-file expected   SchoolPasswordLockFolder    c:\Users\CENSOREDIDONTWANTSTALKERS\documents\visual studio 2015\Projects\App5\SchoolPasswordLockFolder\SchoolPasswordLockFolder\Program.cs  19
致:

局部变量不获取可访问性修饰符,如
public

更改此项:

Severity    Code    Description Project File    Line
Error   CS1022  Type or namespace definition, or end-of-file expected   SchoolPasswordLockFolder    c:\Users\CENSOREDIDONTWANTSTALKERS\documents\visual studio 2015\Projects\App5\SchoolPasswordLockFolder\SchoolPasswordLockFolder\Program.cs  19
致:

局部变量不获取可访问性修饰符,如
public

public string input = Console.ReadLine();
string input = Console.ReadLine();