static void Main(string[] args)
{
List dataList = new List();
for (int i=0;i
{
dataList.Add("string" + i);
}
string result = dataList.Find(destStr => destStr == "string10");
int index = dataList.FindIndex(0, dataList.Count, destStr => destStr == "string10");
int index2 = dataList.FindIndex(0, dataList.Count, destStr => destStr == "string3");
if(index2 != -1)
dataList.RemoveAt(index2);
Console.ReadLine();
}
参考:
http://www.cnblogs.com/zhangchenliang/archive/2012/08/15/2640396.html