Objective 2.2: Consume types

C# is for the most part a statically typed language. This means that the C# compiler will check the type of every expression. This helps you in finding errors like trying to store one type into another type (such as a string in an int). It could be that you know that a type can be used as another type and you want to tell it to the compiler. Because of this, you sometimes have to convert between types. But parts of C# aren’t statically typed. The new dynamic keyword in C# 4.0 enables you to override the compile-time checking and work with C# as a weakly typed language.

Boxing and unboxing

When working with ...

Get Exam Ref 70-483: Programming in C# now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.