i need to check whether a demical is 0 through 49.99 or 50 through 99.99 or 100 through 199.99 or greater than 200. i am trying to do this with select case, but i am not sure of the syntax. please help!
相关问题
- 'System.Threading.ThreadAbortException' in
- how to use special characters like '<'
- C# to VB - How do I convert this anonymous method
- Scaling image for printing
- visual basics equal to or greater than
相关文章
- vb.net 关于xps文件操作问题
- Checking for DBNull throws a StrongTypingException
- Using the typical get set properties in C#… with p
- Load a .NET assembly from the application's re
- C# equivalent of VB DLL function declaration (Inte
- What other neat tricks does the SpecialNameAttribu
- Automatically install updates with ClickOnce deplo
- Resetting Experimental instance of Visual Studio
I have my doubts that you've framed this question to say exactly what you mean. Do you really want the first group to encompass just 0 through 49.99? Or do you really mean 0 up to but not including 50, and you simply expect your input to have 2 decimal places or fewer? If you want to group numbers by fifties, say, then it is very strange to write:
The number 49.995 here falls into the second group, which seems counterintuitive. Picking two decimal places as the cut-off point is arbitrary.
The '<=' operator is not the way to go here; use the '<' operator; it makes a lot more sense:
Where do values as 49.992 fall in your question? Since you said 0-49.99 and then 50-99.99 anything between 49.99 and 50 where does it go? In my example above it would be included in one of the options so it is values between 0 and 49.99, values between 49.99 and 99.99, etc, etc.