当前位置: 动力学知识库 > 问答 > 编程问答 >

What does <.ctor> mean when it appears in a symbol in .Net

问题描述:

I have a symbol that appears that is listed as

MyNamespace.MyClass.<.ctor>b__8()

What exactly does the <.ctor> mean? Or the b__8() for that matter?

网友答案:

This member is a method generated by C#'s compiler for a lambda expression or anonymous delegate used in MyClass's constructor. The part in <> is the name of the method where the lambda expression/anonymous delegate was seen, and b__8 is just a meaningless suffix to make the method name unique.

NB: this naming scheme is an internal implementation detail of C#'s compiler. Don't rely on it if you can help it.

网友答案:

Apparently, the <.ctor> simply is the constructor. The b__8() represents a lamba in that method.

分享给朋友:
您可能感兴趣的文章:
随机阅读: