Main Site Documentation

Data types


#1

Diagonalysing the http://www.amazon.com/dp/B006UZUCEI/ref=rdr_kindle_ext_tmb

I discovered a data type called decimal that I have never seen before. Great VS recognize this type and colorize it a other data types.

As I have some classes that put objects in an hashtable according to their respective types, I decided to add this funny new type to my code. But this results in the following:

I don’t even know if I will use such a type later but I like to understand. Does anyone use it in his code?

If yes in which context?


#2

I’ve never used it, but this might help you out:

http://msdn.microsoft.com/en-us/library/364x0z75(v=vs.80).aspx

Check out the section “Literals”. It explains a little about usage and compiler errors. Also, don’t forget to check out the examples at the bottom. They are usually pretty good in explaining how you can best use it.

Hope that answers your questions!


#3

Here is a good post about decimal vs float:


#4

I believe decimal is not a supported data type in MF,


#5

Unfortunately, it doesn’t. Although Intellisense in VS would have you believe otherwise.


#6

In big .Net, decimal is useful for holding currency values, and for converting from SQL money values.


#7

Many thanks for all your answers.

As already said previously, decimal seems not supported by .netmf whereas it is a c# data-type.

To go further, do you know if there is a webpage on msdn that lists all “single” data-types that are supported in .netmf?

Just for information and discussion: in library System I do not see float or short types :o