No existing question has an answer to this question.
In c# 7, can I switch directly on a System.Type?
When I try:
switch (Type)
Adding to the above answer, if you do not need the value to be used inside the case statement, you can use _. This syntax can be used to remove an unused variable warning message.
switch (this.value) {
case int _:
//Do something else without value.
break;
case decimal decimalValue:
this.value = Math.Max(Math.Min(decimalValue, Maximum), Minimum);
break;
}