Hello,
I have the following Dictionary:
var roles = new Dictionary<Role , string>();
roles.Add(Role. Administrator, "Administrador" );
roles.Add(Role. Collaborator, "Colaborado r");
I have a variable role of type Role (enum).
I want remove all items from my Dictionary with exception of the one
which key is the same as in role variable.
How can I do this?
Thanks,
Miguel
I have the following Dictionary:
var roles = new Dictionary<Role , string>();
roles.Add(Role. Administrator, "Administrador" );
roles.Add(Role. Collaborator, "Colaborado r");
I have a variable role of type Role (enum).
I want remove all items from my Dictionary with exception of the one
which key is the same as in role variable.
How can I do this?
Thanks,
Miguel
Comment