Nt1310 Unit 2 Cast Analysis

Satisfactory Essays
In programming it is often required to convert one data type to another datatype. This is common scenario in LINQ as well. To fulfill this requirement, conversion operator is used. Here we will discuss two types of conversion. 1. Cast 2. OfType Cast The Cast operator attempts to convert all the items within a collection to another type and return them in a new collection. If an item fails to convert then an exception is thrown. This cast method or operator uses deferred
Get Access