Avoid compiling when using Decimal.Round() method (C#/CF)
Posted
by Christian Almeida
on Stack Overflow
See other posts from Stack Overflow
or by Christian Almeida
Published on 2010-05-17T15:27:10Z
Indexed on
2010/05/17
18:10 UTC
Read the original article
Hit count: 344
Is there a way to tell to VS2005 to get compiler error when using "some defined" method?
It probably sounds strange, but I do not want to compile when using Decimal.Round().
Reason:
CF does not round by "awayfromzero", so I created a method to do this job.
But sometimes I (and team) forget that is not to use Decimal.Round. So I'd like to get a compiler error when using it.
© Stack Overflow or respective owner