I\'m looking for a fluent way of determining if a number falls within a specified set of ranges. My current code looks something like this:
int x = 500; // Could
In Pascal (Delphi) you have the following statement:
if x in [40..80] then
begin
end
So if a value x falls in that range you execute your command. I was looking for the C# equivalent to this but can't find something as simple and 'elegant' as this.
This if in() then statement accepts strings, bytes, etc.