##冗長なelse - Redundant 'else' keyword ブロック節を使って直ぐにreturnするならば、elseは要らない。
###変更前
if (!collection.Any())
{
return false;
}
else
{
//何かの処理
}
###変更後
if (!collection.Any())
{
return false;
}
//何かの処理
##冗長なelse - Redundant 'else' keyword ブロック節を使って直ぐにreturnするならば、elseは要らない。
###変更前
if (!collection.Any())
{
return false;
}
else
{
//何かの処理
}
###変更後
if (!collection.Any())
{
return false;
}
//何かの処理