// Collection of code snippets by Arne Vajhøj // (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) using System; public class ROP8 { public static void Test(double v) { string s; if(v < 0.0) { s = "v < 0"; } else if(0.0 <= v && v <= 1.0) { s = "0 <= v <= 1"; } else if(1.0 < v) { s = "1 < v"; } else { s = "WTF?"; } Console.WriteLine(s); } public static void Main(string[] args) { Test(0.5); } }