.Net Tips – using as vs casting in C#
Runtime type conversion is something we all have to do from time to time, and in C#, type conversion is usually done using either the as keyword or casting. Here’s a quick glance of how the two approaches differ: Null reference Conversion failure User-defined conversion Performance as Null Null Ignored Fast casting Null Exception Used …