Tag - as

C# Keywords Tutorial Part 3: as

Casting, often known as explicit type conversion, is done in C# with the "as" keyword. In particular when working with inheritance and interfaces, it is a safer technique to change the type of an object. We'll examine the "as" keyword's functionality in C# and present code samples to demonstrate how to use it in this...