+ 1

Hi every body i would know if we can use probabilité in switch a variable w give for a case <15 or >18 or any think like this

26th Mar 2019, 5:30 PM
Belkassem Mustapha
Belkassem Mustapha - avatar
3 Answers
+ 1
My first answer is no, you can't do that. The second answer is. If you use c# 7 and higher, there is a way to do it but it is no a simple "i > 15" equation https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/switch (made some sample code in the playground, but could not save it ;-((( ) This is allowed in the playground. case Square sq when sh.Area > 0:
26th Mar 2019, 9:42 PM
sneeze
sneeze - avatar
0
Thank you very much Can you exlpain for me the truth diffrence between ++x and x++ I can't understand
26th Mar 2019, 10:23 PM
Belkassem Mustapha
Belkassem Mustapha - avatar
0
Please. Use the search bar for that question. It has been asked may times before.
26th Mar 2019, 10:28 PM
sneeze
sneeze - avatar