Substitutability of generic types in .NET
- π
- π 504 words
- π 3 minutes
- π¦ .NET
- π·οΈ C#
- π¬ 1 response
Anyone using object orientated programming soon finds themselves wanting to perform some action only if an object is of some type or implements some interface.
The easiest way is to do this is to use the is
is operator. Typically it will appear something like: