标签:lis put shu ring system bis using alt sys
using System;
using System.Collections.Generic;
using System.Text;
namespace MyDelegate
{
class Program
{
static void Main(string[] args)
{
List<string> m_liName=new List<string>();
m_liName.Add("sadi");
m_liName.Add("pothik");
m_liName.Add("shiman");
m_liName.Add("shuvro");
m_liName.Add("arif");
//**************Find a single data
string sName = m_liName.Find(delegate(string s)
{ return s.Equals("sadi"); });
//**************Find multiple data
List<string> liName1 = m_liName.FindAll(delegate(string s)
{ return s.Equals("sh"); });
//*************If contains the data**********
bool bIsSuccess = m_liName.Contains("sadi");
// output: true
}
}
}
标签:lis put shu ring system bis using alt sys
原文地址:http://www.cnblogs.com/yangmingyu/p/6903052.html