asp.net中出现错误“命名空间不能出现包含字段或方法之类的成员”,代码如下
usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespa...
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication10
{
class Program
{
private string name = "张三";
private int age = 16;
public void Main(string[] args)
{
Console.WriteLine("name:{0},age:{1}", name, age);
Console.ReadLine();
}
public void youname(string Name)
{
name = Name;
}
public void youAge(int PersonAge)
{
age = PersonAge;
}
}
Console.WriteLine("name:{0},age:{1}",name,age);
}
希望给出详细的解答,和原理 展开
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication10
{
class Program
{
private string name = "张三";
private int age = 16;
public void Main(string[] args)
{
Console.WriteLine("name:{0},age:{1}", name, age);
Console.ReadLine();
}
public void youname(string Name)
{
name = Name;
}
public void youAge(int PersonAge)
{
age = PersonAge;
}
}
Console.WriteLine("name:{0},age:{1}",name,age);
}
希望给出详细的解答,和原理 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询