default keyword

We can use default keyword to get the default value for each type.

using System;

class Program
    static void Main(string[] args)
        double d = default(double);
        string str = default(string);


The output:

0  |  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.