Bad compile constant value

today i've installed the Resharper 2.0 Beta and i'm quite happy with the new release. But there is a small problem with the highlighting: The following piece of code will be marked by Resharper as a "Bad compile constant value"-Error:

decimal x = 0;
if( x == decimal.Zero )
x = 6;

I use the decimal.Zero quite often in my code. Is this a Bug or some hidden feature?

4 comments
Comment actions Permalink

Fixed in upcoming build 237

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Stefan Urech" <no_reply@jetbrains.com> wrote in message
news:32837303.1145956987945.JavaMail.itn@is.intellij.net...

today i've installed the Resharper 2.0 Beta and i'm quite happy with the
new release. But there is a small problem with the highlighting: The
following piece of code will be marked by Resharper as a "Bad compile
constant value"-Error:

>

decimal x = 0;
if( x == decimal.Zero )
x = 6;

>

I use the decimal.Zero quite often in my code. Is this a Bug or some
hidden feature?



0
Comment actions Permalink

I've just installed Build 237, but there's still the same problem...



Attachment(s):
error.JPG
0
Comment actions Permalink

VS2003 or VS2005?

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Stefan Urech" <no_reply@jetbrains.com> wrote in message
news:6658177.1146038414151.JavaMail.itn@is.intellij.net...

I've just installed Build 237, but there's still the same problem...



0

Please sign in to leave a comment.