c__DisplayClassX", where X is a number? I have an exception thrown by a WPF application. Message: Type 'MyNamespa...">

What is a suffix like "+ <> c__DisplayClassX", where X is a number?

I have an exception thrown by a WPF application. Message:

Type 'MyNamespacesPath.AType+<>c__DisplayClass5' in Assembly... is not marked as serializable

The problem is that the type cannot be serialized. But this type is auto-generated, maybe an anonymous method or an expression tree. Does anyone know the exact origin of these types to know where to find the error?

+5
source share
1 answer

( delegate -), . ,

, :

  • <>f__AnonymousType0<<a>j__TPar, <b>j__TPar> ( new { a = 1, b = "2" }).
  • , <ZipIterator>d__0<TFirst, TSecond, TResult> ( )

, , . .

+3

All Articles