Pages

Wednesday, November 28, 2012

Indicating a value as decimal literal in C Sharp

A value such as 14.5 is taken as a double by default by C Sharp and which cannot be automatically typecasted in decimal.

So indicate its data type as decimal we append M at its back

for example

decimal variable= 14.5M

1 comment:

  1. Good article

    https://wordpress-special-plugin.blogspot.co.id

    ReplyDelete