Priority
Normal
Type
Bug 
State
Fixed 
Assignee
Andrey Simanovsky 
Subsystem
No subsystem 
Affected versions
Fixed in
Fixed in build
Next build 
Build
262
Fixed in build
264
  • Submitted by   Vladimir Reshetnikov
    3 years ago (26 Sep 2006 18:00)
  • Updated by Vladimir Reshetnikov
    3 years ago (24 Oct 2006 18:12)
  • Jira: RSRP-29034
    (history, comments)

RSRP-29034

'Use equality operator' shall be disabled if return value ignored

0
class Program
{
    static void Main()
    {
        Equals(null, null);
    }
}


Try context action 'Use equality operator'.

class Program
{
    static void Main()
    {
        null == null; // error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
    }
}


Context action 'Use equality operator' shall be disabled for such cases.
Possibly, it makes sense to show warning if return value of methods, inherited from System.Object (Equals, ToString etc), is ignored.

Issue was closed
Comments (0)
 
History (0)
 
Links
 
Issue has no comments