> protected override void OnTextChanged(EventArgs e) > { > if (this.Parent is IMyInterface) > { > ((IMyInterface)this.Parent).MyMethod(true); > } > base.OnTextChanged(e); > }is
> protected override void OnTextChanged(EventArgs e) > { IMyInterface o; > if ( ( o = this.Parent as IMyInterface) != null ) > { > o.MyMethod(true); > } > base.OnTextChanged(e); > }