this is the line of code where it shows the error
var physician = (from userAccounts in myDb.Physicians
where userAccounts.Phy_UserName == txtUserName.Text
select userAccounts).FirstOrDefault();
setFirstName(physician.Phy_FName);
But in my setter I have a pre condition that if it's a null value it wouldn't do anything but how come it still shoes that error? here's my setters code
public void setFirstName(string fName) {
if (fName == null)
{
}
else {
firstName = fName;
}
}