Media Portal 2

mp2icongeneral

Double assignment

V3008 The ‘Released’ variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 57, 56. OmDbSeasonEpisode.cs 57

DateTime releaseDate;
if (DateTime.TryParse(value, out releaseDate))
  Released = releaseDate;  
Released = null;  

Most likely this statement with the nullification should be written in the else block. Then the correct code fragment will be like this:

DateTime releaseDate;
if (DateTime.TryParse(value, out releaseDate))
  Released = releaseDate;
else
  Released = null;

Please click here to see more bugs from this project.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s