How can I prevent infinite recursion when using events to bind UI elements to fields?
- by Billy ONeal
The following seems to be a relatively common pattern (to me, not to the community at large) to bind a string variable to the contents of a TextBox.
class MyBackEndClass
{
public event EventHandler DataChanged;
string _Data;
public string Data
{
get { return _Data; }
set
{
_Data = value;
…