Skip to content

Monthly Archives: September 2009

Two casts are not better than one

26-Sep-09

C# has an interesting operator know as “is“. The is operator is used for execution-time type checking. It is a binary operator that returns a Boolean indicating whether or not the instance in question is in fact of the type specified as the second operand.

Here is an example:

using System; class Example { [...]