本篇文章主要是对List中Find的用法进行了总结介绍,需要的朋友可以过来参考下,希望对大家有所帮助
I've been looking for help on how to find objects in Generics with List.Find() method .... and ... take a look what I have found.
In the follow example, I created a simple class:
复制代码 代码如下:
public class Person
{
private int _id;
private string _name;
public int ID { get{ return _id;} set{ _id = value;}}
public int Name { get{ return _name;} set{ _name= value;}}
public Person(int id, string name)
{
_id = id;
_name = name;
}
}
以上就是List<>中Find的用法小结的详细内容,更多请关注0133技术站其它相关文章!