Types of Number literals in C#

Hi Folks,

In this post I touch briefly on types of number literals in C# programming language.

An illustration is

var f = 0f; // float
var d = 0d; // double
var m = 0m; // decimal (money)
var u = 0u; // unsigned int
var l = 0l; // long
var ul = 0ul; // unsigned long

For example, this menas if you see a number with “m” suffix, it is a decimal literal.

That’s all for now. Till next time, happy software development.

Leave a Reply

Your email address will not be published. Required fields are marked *