I have two questions with this code:
public int InsertOrUpdateRecord(char _code, string _databaseFileName)
{
switch(_code)
{
case 'N':
// Some code here
case 'U':
// Some code here
}
return 0;
}
- It is not accepting char single quote and double quote value.
- If I pass _code as string, it gives red underline in case with this error:
Control cannot fall through one case label to another.
The reason for the compilation error is that the
caseis missing thebreak