.Net Tips – Getting the default value of a type outside of generics
To get the default value of a type, you’ve probably used the default keyword in .Net already: 1: var defaultInt = default(int); // 0 2: var defaultObj = default(string); // null However, the use of the default keyword requires a type name to be specified at compile time, so you won’t be able to use …
.Net Tips – Getting the default value of a type outside of generics Read More »