D
Déjà-vu
Hello everybody,
browsing code with the .Net reflector, I found out, that there is an
virtually undocumented feature in the PropertyName Changed pattern used,
when creating a custom control that supports databinding:
A boolean PropertyNameIsNull property, that - if available - will check
if the value of the control represents a NULL value.
public class Foo : Control
{
private string fFooString;
public event EventHandler ValueChanged;
public string Value
{
get { return fFooString; }
set
{
if (fFooString != value)
{
fFooString = value;
if (ValueChanged != null)
ValueChanged(this, new EventArgs());
}
}
}
public bool ValueIsNull
{
get { return fFooString == null; }
}
}
Is there any official documentation that relates to this fact?
Can this be used savely?
Why is it not documented?
Any ideas?
Tilman
browsing code with the .Net reflector, I found out, that there is an
virtually undocumented feature in the PropertyName Changed pattern used,
when creating a custom control that supports databinding:
A boolean PropertyNameIsNull property, that - if available - will check
if the value of the control represents a NULL value.
public class Foo : Control
{
private string fFooString;
public event EventHandler ValueChanged;
public string Value
{
get { return fFooString; }
set
{
if (fFooString != value)
{
fFooString = value;
if (ValueChanged != null)
ValueChanged(this, new EventArgs());
}
}
}
public bool ValueIsNull
{
get { return fFooString == null; }
}
}
Is there any official documentation that relates to this fact?
Can this be used savely?
Why is it not documented?
Any ideas?
Tilman