We all know in standard event handlers you get two parameters, the first of type object and the second is a type of EventArgs. But how do you know what kind of object/datatype the sender is? Do you know if it's a Button, PictureBox, TextBox or even one of your own objects?
You could use the old C-style casts if you're 100% sure what type of object you're dealing with.

BUUUUUUT what happens on the off chance your buddy in the next cubicle starts using your event handler from a different source, like an image for example? Hhhhmmm can you say unhandled exception?

Another way is to do string comparisons. But even with the umpteen different ways to comare strings (two are illustrated), it still seems very cumbersome and time consuming.

So what's a coder supposed to do? No, bearing your head in the sand is only for Sens
fans. :> DOH! Sorry, showing a bit of my Habs
loyalty there. :> But seriously, .NET has two operators you can use just for this purpose, the "is" and the "as" operators.
The (overly simplified :>) code below illustrates using both the "is" and "as" operators.

Is Operator
Makes your code clean to read and maintain and is great for when you're not necessarily going to do anything with that datatype you're checking against. In my example I am, but in general, if you were just checking for a Button and then would do something else, then the "is" operator is your man, uh, keyword. :>
As Operator
However, if what you do need to do is cast the object and get properties, call methods, etc, then maybe the As operator is your keyword of choice. This operator has one caveat, you'll have to check for null before using it! Otherwise you'll have a null reference exception on your hands.

Conclusion:
The "is" operator is great for quickly checking types but only checking types, you still have to cast after that if you want to do specific types of things on that object.
The "as" operator will cast the object to the datatype you want, but you will have to check for null before using it.
References: Jay Miller: .NET Tip: Type Casting and Comparison Using "as" and "is"