我正在创建一个构造函数,它需要从另一个类中获取所有变量。目前我有:
public class Person
{
public Person(Address.AddressDetails newAddress , string newTitle, string newForname, string newSurname, string newTel,
string newMob, string newEmail)
{
}
static public int ID;
static public string Title;
static public string Decorations;
static public string Forename;
static public string Surname;
static public string Telephone;
static public string Mobile;
static public string Email;
static public Address.AddressDetails Address;
}
Address.AddressDetails 中的变量也是静态的。如何让 Person.Address 表示 AddressDetails 类中的所有变量?