这是我的类文件我收到错误,因为“方法必须有返回类型”
public class Users
{
public string FirstName { get; set; }
public string LastName { get; set; }
}
public class UsersList : List<Users>
{
public UsersList
{
this.Add(new Users() { FirstName = "John", LastName = "Lock"});
this.Add(new Users() { FirstName = "James", LastName = "Soyer"});
this.Add(new Users() { FirstName = "Jack", LastName = "Sephered"});
}
}
我正在尝试绑定到自定义实例集合的静态资源
答案 0 :(得分:4)
...
public UsersList()
{
...
}