Could be because KeysCollection only implements IEnumerable not IEnumerable<T
>. Try using the Cast method on the Keys property first, something like:
var query = from q in System.Web.Configuration.WebConfigurationManager.AppSettings.Keys.Cast<string>()
where q.StartsWith("Foo")
select q;
Simon Fox
2009-09-12 04:34:09