0

Often C# debug messages and stack traces contain method names that look similar to the following:

XGI.Dialogs.XgiMainMenuDialog+<>c__DisplayClass16_0

I always struggle to read these strings. What is the "+<>" after my class name? What is "DisplayClass"; I have no such method or class in my code.

Any advice on how to interpret these method name strings?

willem
  • 25,977
  • 22
  • 75
  • 115
  • Someone asked the same question. It may help you. https://stackoverflow.com/questions/16401860/what-does-displayclass-name-mean-when-calling-lambda – OnurBulbul Sep 20 '17 at 12:32
  • They are classes that the compiler generates. The `<>` is part of the actual name of the class. (So the name is `<>c__DisplayClass16_0`) That way, there will never be a naming conflict. – Dennis_E Sep 20 '17 at 12:38
  • That's perfect, thank you. Makes sense now. – willem Sep 20 '17 at 12:40
  • https://stackoverflow.com/a/14092456/2594485 – Dennis_E Sep 20 '17 at 12:41

0 Answers0