Tag - casting

C# Keywords Tutorial Part 57: object

C# is a contemporary programming language with an object-oriented approach utilized for building various software applications. One of the key elements in C# is the "object" keyword, which is employed to produce instances of classes and structures. This blog post will delve into the "object" keyword in C#, encompassing its definition, application, and some optimal...

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...