Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42220

Question regarding the Switch statement?

$
0
0
I'm new to C# and I'm trying to use the switch statement. Below is how I'm trying to use it but I'm getting a syntax error. I've been searching the net and MSDN and can't find an example of what I'm trying to do.

Code:

diff = 784;

switch (diff)
{
    case (diff > 365):
}

It doesn't like my case statement. Is this comparison possible? If so, what is the correct syntax?

Thanks,

Viewing all articles
Browse latest Browse all 42220

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>