Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Decimal precision
Message
From
23/05/2012 09:13:54
 
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01544101
Message ID:
01544136
Views:
20
>A double in VFP and .NET are both 64-bit values so I guess precision will be the same (although the results may not be identical - and in practice even in .Net can vary depending on the platform)
>
>If you need *more* precision in .NET there's always the System.Decimal type - but it is 128-bit and has a smaller range....
>
>> If yes, what would be the default number of decimals place that would be considered?
>
>As Gregory points out - you may be confusing displayed values with stored values.
>If you need to actually round a double value then use Math.Round().
>If it's just for display then use one of the ToString() overloads e.g:
>.ToString("C") , ToString("#000.000") etc. See :
> http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx and http://msdn.microsoft.com/en-us/library/0c899ak8.aspx

Thanks
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform