I'm trying to modify each value in a Dictionary. The answers about how to do that generally look like this (taken from here):
foreach (var key in myDictionary.Keys.ToList())
{
myDictionary[key] = <some kind of new value>
}
Seemingly straightforward, but it doesn't work for me; Visual Studio underlines ToList() and says
'System.Web.UI.WebControls.QueryableDataSourceHelper.ToList(System.Linq.IQueryable, System.Type)' is inaccessible due to its protection level.
Am I doing something wrong? (Obviously yes, but what?)