Which is the better data type for storing monetary values in Sharepoint 2010?

﹥>﹥吖頭↗ 提交于 2019-12-25 03:29:32

问题


In Sharepoint 2010, the "field types" (data types) for list items that could presumably be used for monetary values are Decimal and Currency. Normally, decimal is the preferred data type in C# for money.

But what of this Currency type? Based on its name, it seems it may be the more suitable of the two. Is it?

I could also use integer (where 1225 represents $12.25, for instance) or String (where "12.25" represents $12.25), but the first two mentioned (Decimal and Currency) would seem to be the best bets.

UPDATE

Oddly enough, I was going to provisionally go with "Decimal" in my list, but SPFieldType actually doesn't seem to have a Decimal member available, so for now I'm going with Currency. According to page p. 230 of "Inside MS Sharepoint 2010," though, Decimal is one of the types...???

来源:https://stackoverflow.com/questions/30676856/which-is-the-better-data-type-for-storing-monetary-values-in-sharepoint-2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!