using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GrammarDemo
{
class Program
{
static void Main(string[] args)
{
Person person = new Person("zs", 20) ;
Person person2 = new Person("ls", 20);
Console.Read();
}
}
public class Person
{
public string Name { get; set; }
public int Age { get; set; }
public Person(string name, int age)
{
this.Name = name;
this.Age = age;
Console.WriteLine("普通构造函数");
}
static Person()
{
Console.WriteLine("静态构造函数");
}
}
}