我有下面的代码,并想知道为什么其他部分是resharper无法访问.
private bool SomeMEthod(some parameter)
{
bool status = false;
var someCollection = _entity.CustomerPaymentStatus.Where(record => record.CustomerPaymentId == paymentId && record.CurrentRecord == true);
if (someCollection != null)
{
var receivedPayment = someCollection.FirstOrDefault();
/*some code to save data into DB*/
status = true;
}
else
{
//Some code here to log failure scenario
//here Resharper giving me warning
//code is heuristically unreachable
}
return status;
}
Run Code Online (Sandbox Code Playgroud)
我检查了几个帖子,但不清楚像Code是启发式无法访问
请任何想法.