check that struct is empty
Published: 26. October 2011 | Updated: 26. October 2011License: Microsoft Public License (MS-PL)
Categories: Framework » Basics
Tags: Basics C#
int a = 50; int b = 0; int c = new Int32(); Console.WriteLine(a == default(int)); Console.WriteLine(b == default(int)); Console.WriteLine(c == default(int));Console Output:
False
True
True
True
True
| Send us feedback about this snippet » |





