我试图弄清楚如何使用 Linq 从我的 web.config 文件中过滤掉我的一些 appsettings。
我正在尝试执行以下操作(语法错误):-
var query = from q in System.Web.Configuration.WebConfigurationManager.AppSettings.Keys
where q.StartsWith("Foo")
select q);
我做错了什么?
编辑:添加screenie(这是它的链接)