I was looking at the dapper page and saw this terse bit of coding:
new { Age = (int?)null, Id = guid });
What does (int?)null do?
Could someone please elucidate what is going on there, and perhaps give a more "verbose" version of the code?
int? is shorthand for Nullable<int>. as such this line of code is converting null (which by default is of type object) to a null int.
Docs: http://msdn.microsoft.com/en-us/library/b3h38hb0.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With