Casting Within Inheritance Hierarchies
Learn about type casting in C#, including implicit and explicit casting.
Casting between types is subtly different from converting between types. Casting is between similar types, like between a 16-bit integer and a 32-bit integer or between a superclass and one of its subclasses. Converting is between dissimilar types, such as between text and a number.
Get hands-on with 1400+ tech skills courses.