using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
using System.Xml.Linq;
class Program
{
static void Main(string[] args)
{
List<string> myList1 = new List<string>();
myList1.Add("A");
myList1.Add("B");
myList1.Add("C");
myList1.Add("D");
string vanilla1 = myList1.Find(delegate(string icecream)
{
return icecream.Equals("B");
});
Console.WriteLine(vanilla1);
}
}
|