CSharp examples for Language Basics:default
Using Default Expression in array
using System;//w w w .j ava 2s .c o m class DefaultExpression2 { static void Main() { var intArray = new[] { default, 5 }; var stringArray = new[] { default, "text" }; var boolArray = new[] { default, true }; Console.WriteLine(intArray[0]); Console.WriteLine(stringArray[0] == null); Console.WriteLine(boolArray[0]); } }