Cast Operator with Anonymous Types

Below is a sample sourecode that demonstrates the usage of the Cast Operator when using the anonymous type

Cast Operator with Anonymous Types

C#

When the element within the List cannot be converted to the target type, you will receive an exception “InvalidCastException”.

Cast Operator with Anonymous Types

1 Comment

  • Where is the solution for above problem

Leave Your Comment