I have a web service that I am calling which take a string, and returns a list of strings as an object[].
I want to covert this to a Dictionary> object. I'm currently using something like this:
foreach (string role in allRoles)
{
Dictionary<string, List<string>> allActionsForRole =
lifeRay.getRoleActions(role)
.ToDictionary<string, List<string>>(role, x => x.ToString());
}
It doesn't like the "role" field.
How should I write this?
I'm assuming I could write it somehow to even remove the foreach, right?