10 August, 2010
0 Comments
1 category
If you want to determine if an element in a generic list or collection exists, use the "Any" function with a lambda expression, like:
public bool Exists(string name) { bool result = false; using (ServerManager manager = new ServerManager()) { result = manager.ApplicationPools.Any(a => a.Name == name); } return result; }
You can find the Microsoft.Web.Administration.dll in "%windir%\System32\inetsrv".
Category: Uncategorized