CSharp examples for Language Basics:Variable
Get the default value for various variables
using System;// www . j a v a2s.co m class Program { static void Main(string[] args) { Console.WriteLine($"{default(int)}"); // 0 Console.WriteLine($"{default(bool)}"); // False Console. WriteLine($"{default(DateTime)}"); // 1/01/0001 00:00:00 } }