tags:

views:

85

answers:

3

For example:

  • StudentRegistrationService<>c__DisplayClass1
  • <>f__AnonymousType56`2
  • DocShareClassification<GetErrors>d__2

I'm fairly certain that StudentRegistrationService<>c__DisplayClass1 is a closure, and <>f__AnonymousType56`2 was generated when an anonymous type was specified, but I've never seen the d__ class before. Are there any more than just these?

+1  A: 

That are at compile time generated classes created by using anonymous types

Wouter Janssens - Xelos bvba
+6  A: 

These are classes which are generated by the C# compiler in order to support at least the following features

  • Closures / Anonymous Method expressions
  • Anonymous types
  • Iterators

The d__2 one is likely an iterator helping class.

JaredPar
A: 

IIRC it is classes generated for iterator blocks. However you should make any assumptions about these names or rely on them - it is implementation details and may be changed in any time

desco