0

I am using switch case into my method like in screenshot

image

I already done with Enumeration but how can I directly pass int constant into case??
I googled it but I found it with Enumeration

Please help me with it

Jitendra Modi
  • 2,344
  • 12
  • 34

1 Answers1

0

If that's all the functionality you want to achieve then you should write something like this:

if (index.row == value) {
    // logic when it's that row
} else {
    // default case
}

What you tried to do is simply not possible, see the two questions linked by Martin R in the comments.

Peter Tutervai
  • 793
  • 12
  • 21