I have the following code:
enum type = { OPEN = 0, CLOSED, UNDEFINED};
list<int> frequencia = new list<int>(new int[] {0,0,0});
I would like to do the following operation:
type t = enum.OPEN;
frequencia[t]++;
But I can not. Any solution on how to convert the enum variable to int?