Forums - C# Corner

Forum guidelines
Chandrakant Patil

Chandrakant Patil

  • 1.6k
  • 172
  • 7.1k

Need Suggestions to Refactor Code

Apr 15 2019 7:49 AM
Today I have just seen the code which I wrote 3 Years ago, Using I think Visual Studio 2008.
I am surprised how Visual Studio has become Intelligent.
It's showing me some fixes, as Unreachable code detected (return false)
public bool ADD(BankBEL objBankMasterBEL)
bool result = false;
BankDAL objDAL = new BankDAL();
if (objDAL.IsRecordExist(objBankMasterBEL))
throw new Exception("This name already exists..");
return false;
result = objDAL.ADD_BANKMASTER(objBankMasterBEL);
return result;

Answers (1)