Home / Vulnerability Database / C-sharp : Switch missing default
C#
C-sharp : Switch missing default
Classification
CWE
Overview
A switch statement missing default label.
The use of default label can aid in avioding mistakes and can be used for the following reasons:
- Perform some action if the variable has unexpected value.
- Handle default cases, while special ones are handled under
caselabels. - The one reading the code can crearly see that all cases are covered.
LOW
DerScanner Severity Score
Do you want to fix C-sharp : Switch missing default in your application?
See also
C#
C-sharp : JWT: None Algorithm
C#
C-sharp : Insecure data transmission: Database
C#
