C#类、结构或接口成员声明中的标记无效

来源:百度知道 编辑:UC知道 时间:2024/06/02 00:50:09
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
te hehe t=new text.hehe
te.intro();
{
Console.WriteLine("lang");
}
}
}
namespace te
{
public class hehe
{
public void intro()
{
Console.WriteLine("lang");
}

}
错误 1 应输入 ;
错误 2 类、结构或接口成员声明中的标记“=”无效
错误 3 类、结构或接口成员声明中的标记“{”无效
错误 4 类、结构或接口成员声明中的标记“(”无效
错误 5 应输入类型、命名空间定义或文件尾

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

namespace ConsoleApplication1
{
class Program
{
static void main()
{
te.hehe t = new text.hehe();
te.intro();
Console.WriteLine("lang");
}
}
}
namespace te
{
public class hehe
{
public void intro()
{
Console.WriteLine("lang");
}

}
}

无语。这都不会调试啊。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
public static void main()
{
te.hehe t = new text.hehe();
te.intro();
Console.WriteLine("lang");
}