I am not sure that I get it correctly, but you may try
Random rnd = new Random();
int caseSwitch = rnd.Next(1, 13);
More Related Contents:
- Using Case/Switch and GetType to determine the object [duplicate]
- Generate random string from list of string in C#? [closed]
- comma in switch case [closed]
- How can I get more than one random numbers in a specific range using C#?
- Is there a better alternative than this to ‘switch on type’?
- Random.Next returns always the same values [duplicate]
- Most efficient way to randomly “sort” (Shuffle) a list of integers in C#
- C# switch statement limitations – why?
- Is there any significant difference between using if/else and switch-case in C#?
- Switch statement fallthrough in C#?
- Multiple cases in switch statement
- Is there any benefit to this switch / pattern matching idea?
- C# switch on type [duplicate]
- Why switch for enum accepts implicit conversion to 0 but no for any other integer?
- Switch case: can I use a range instead of a one number [duplicate]
- Random weighted choice
- Unique random string generation
- Variable declaration in a C# switch statement [duplicate]
- Why does it appear that my random number generator isn’t random in C#?
- Why use the C# class System.Random at all instead of System.Security.Cryptography.RandomNumberGenerator?
- Switch case in C# – a constant value is expected
- Are .Net switch statements hashed or indexed?
- C# – Which is the best alternative to ‘switch on type’? [duplicate]
- Random date in C#
- How to generate random color names in C#
- Random encounter not so random
- How to get a random number from a range, excluding some values
- In a switch vs dictionary for a value of Func, which is faster and why?
- linq: order by random
- Generate distinctly different RGB colors in graphs