con la tua sintassi

codice:
if (f.nomecasella.checked)
(true è sottointeso)