Data Type C# Tutorial

using System;
using System.ComponentModel;
    class DefaultValueComparison
    {
        static int CompareToDefault(T value)
            where T : IComparable
        {
            return value.CompareTo(default(T));
        }
    
        static void Main()
        {
            Console.WriteLine(CompareToDefault("x"));
            Console.WriteLine(CompareToDefault(10));
            Console.WriteLine(CompareToDefault(0));
            Console.WriteLine(CompareToDefault(-10));
            Console.WriteLine(CompareToDefault(DateTime.MinValue));
        }
    }