check against: null vs default()?
There is no difference, but second one is more readable. The best place to use default
is when you deal with generics. Common code is return default(T);
There's no difference. The default value of any reference type is null
.
MSDN's C# reference page for default
keyword: https://msdn.microsoft.com/en-us/library/25tdedf5.aspx.