初始化此课程的最佳方法是什么?
public class allNames
{
public class fullName
{
public String firstName { get; set; }
public String lastName { get; set; }
}
public List<fullName> Names { get; set; }
}
答案 0 :(得分:0)
使用值:
new allNames {
Names = new List<fullName> {
new fullName { firstName = "first", lastName = "last" }
}
};