Lately I wondered performance on different type cast, es:
- MyClass myObj = (MyClass)genericObj;
- MyClass myObj = genericObj as MyClass;
- genericObj is MyClass
Have a nice reading. 😉
PS: you may have a look also here Type casting impact over execution performance in C#, Perfomance of TypeCasting, and Type Casting in C#.
I’ll have a deep read too. 😉