Check if object is NOT of type (!= equivalent for “IS”) – C# January 30, 2023 by Tarik This is one way: if (!(sender is TextBox)) {...}