传递对象与返回对象不是两回事
private static void GetName(Name name)
{
name = new Name("gan", "fu");
}
public class Name
{
public string FirstName { get; set; }
public string LastName { get; set; }
public Name()
{
}
public Name(string firstName,string lastName)
{
this.FirstName = firstName;
this.LastName = lastName;
}
}