Instead of using explicit declarations and casting like this:
long l = 12; var d = (double)12; float f = 12.0; //compilation error var u = (UInt32)12; decimal m = 12; ulong ul = 12;
You can use the numerical suffixes like this:
var l = 12L; var d = 12D; var f = 12.0F; var u = 12U; var m = 12M; var ul = 12UL;
So there we are. Interesting? Or maybe everyone already knew that and I've only just found it.
ReplyDeleteThanks for posting this useful content, Good to know about new things here, Let me share this, . Hadoop training in pune
Numeric suffixes, also known as the literal number suffixes, are hints of a certain kind for the compiler. Note, "literal" means a hard-coded value in your software. Assignment Writing UK
ReplyDelete