When performing an object comparison, is it faster to compare by name (string) or type (pointer)?
See below:
if(sender is DataGridView) { .. }
or
if(sender.GetType().ToString() == "System.Forms.DataGridView") { .. }
Note: I may not have the syntax exactly right... this is a C# example, but the comment answer here in one my questions made me think about it.