Yes,
it´s c#
i have to compare the value of a textbox with the day in a datetime field.
this.DIA_RETIRADA.Text == this.ObjReserva.AgRetirada.DtRetirada.ToString("dd")
but in some cases, i need to know if the "DtRetirada" exists otherwise i get an
error:
reference set to a non object , in that line.
so, i tryed this:
if( this.ObjReserva.AgDevolucao.DtDevolucao != null &&
this.ObjReserva.AgDevolucao.DtDevolucao.ToString("dd/MM/yyyy HH:mm") != ""){
this.DATA_HORA_DEVOLUCAO.Text =
this.ObjReserva.AgDevolucao.DtDevolucao.ToString("dd/MM/yyyy HH:mm");
this.DATA_HORA_DEVOLUCAO.Visible = true;
}