We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
索引器&集合配合使用,实现使用[]获取数据的目的
private List<DataModel> dataList; public DataModel this[string name] { get { return dataList.Find(x => x.Name == name); } } public DataModel this[int index] { get { return dataList[index]; } }
IndexerAndCollection