Rounding in the .Net Compact framework

A

AF

Can anyone advise as to how best to fix the problem with rounding in
the .Net Compact framework. Or can you at least confirm that the only
rounding method in place is "MidpointRounding.ToEven ".

We have concluded that the compact version of the framework appears
not to implement both "MidpointRounding.ToEven" and
"MidpointRounding.AwayFromZero" as is implemented in the .Net
Framework. Our conclusion is based on the fact that:
1. Intellisense doesn't reveal any such overload to supply the
enumeration.
2. You get a compiler error when you try to enter the 3rd parameter in
the function.
3. The method signature from the metadata in mscorlib.dll doesn't
reflect their existence.

Given that the above conclusion is correct, it is beyond comprehension
why anyone would choose to implement the "toEven" form instead of the
"awayFromZero" but if that is the case, we need to know. We need to
resolve this with an application that is in the field and so there is
a certain urgency and if there already is a fix available, we would be
most grateful. Barring that, unless you indicate otherwise the only
solution we see is to write a separate rounding function.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top