这是代码,调试出错了!
namespace student
{
public class studentage
{
static void Main(string[] args)
{
string number = "2013111109";
string name = "Xu";
DateTime birth = new DateTime(1992, 11, 11);
int age = getage;
Console.WriteLine(age);
Console.ReadLine();
}
}
public class student
{
public string number;
public string name;
public string birth;
public int getage
{
getage = DateTime.Now;
return getage.Year - birth.Year;
}
}
}
namespace student
{
public class studentage
{
static void Main(string[] args)
{
string number = "2013111109";
string name = "Xu";
DateTime birth = new DateTime(1992, 11, 11);
int age = getage;
Console.WriteLine(age);
Console.ReadLine();
}
}
public class student
{
public string number;
public string name;
public string birth;
public int getage
{
getage = DateTime.Now;
return getage.Year - birth.Year;
}
}
}