using System;

namespace MyCompiler {
    class Program {
        public static void Main(string[] args) {
            var l = new[] { 1L, 2L, 3L };
            foreach (var b in new[] { true, false}) {
                var a = b ? l[0] : (long?)null;
                var o = b ? l[0] : (object)null;
                Console.WriteLine($"{b}, {(a is long)}, {a.HasValue}, '{a}'");
                Console.WriteLine($"{b}, {(o is long)}, '{o}'");
            }
        }
    }
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: