If Statement condition c# is not working

Have you tried this suggestion?