Anonymous types are internal

When testing against anonymous types you need to know that they are internal to the assembly they are declared in.

Add an InternalsVisibleTo assembly attribute to the declaring assembly to resolve this or you will get RuntimeBinderException exceptions like the following:
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'object' does not contain a definition for 'Success'
For more detailed explanations and samples have a look at:

Comments

Popular Posts