C#C
C#4y ago
Matt

❔ alternative to switch statement or if statements?

is there something better I can use in this situation?
int size = 300;
switch (HLevel.CurrentLevelId)
{
    case 0: 
        address = HOpal.address1; 
        size = 25; 
        break;
    case 10: 
        address = HOpal.address2; 
        break;
    default: 
        address = HOpal.address3; 
}              
Was this page helpful?