Erro no Objeto

aishihara

Power Member
Bom dia,

Tenho a seguinte linha:
if
((row.Cells[0]).Value.Equals(true))

E ocorreu o seguite erro:
Object reference not set to an instance of an object.
Pq isso acontece?

Agradeço a atenção,

André Ishihara
 
Bom dia,

Tenho a seguinte linha:
if
((row.Cells[0]).Value.Equals(true))

E ocorreu o seguite erro:
Object reference not set to an instance of an object.
Pq isso acontece?

Agradeço a atenção,

André Ishihara

row.Cells[0] se calhar está a retornar null. NUNCA se faz casts directos de coisas que não sabemos o que contém.
 
Back
Topo