Retrieval of items from custom collection

后端 未结 4 984
失恋的感觉
失恋的感觉 2020-12-20 22:45

I have a following class

public class People
{
    public int id;
    public string nameHash;
    public string name;
}

I need to create a

4条回答
  •  渐次进展
    2020-12-20 23:26

    class PeopleList : List {
    
    }
    

    That's pretty much it. Just inherit from List and you're set.

    BTW, you should reconsider your naming conventions. 'People' is not a good name for a class that represents a single person. Name it 'Person' instead, and name your list 'People'.

提交回复
热议问题