Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-287788: string.IsNullOrEmpty(str) and (str == null) can be removed if checks const string

$
0
0
Reporter Alexander (sash_subscr) Alexander (sash_subscr)
Created Jan 15, 2012 4:41:28 PM
Updated Jan 15, 2012 4:45:02 PM
Priority Normal
Type Feature
Fix versions No Fix versions
State Submitted
Assignee Unassigned
Subsystem Code Analysis
Affected versions 6.1
Fixed in build No Fixed in build
// string.IsNullOrEmpty(str) can be removed.
string str = Request.QueryString["name"];
if (string.IsNullOrEmpty(str) || str != "not empty const string")
{ ... }

// (str == null) can be removed.
string str = Request.QueryString["name"];
if (str == null || str != "const string")
{ ... }

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>