I am writing some code, and I wanna "ask" if an object name is not null (aka, the object exist) then do some work, else, do other work...
Of course, by doing "If (textbox.name == null)" I get the error NullReferenceException.
Example of what I want to do in a function that have a public textbox object:
private TextBox det;
public TextBox Det
{
get { return det; }
set { det = value; }
}
if (det.Name != "")
{
Funciones.Detalle(det, CodBrowse, this.Text);
}