c# - What does ClassName.ctor>b__11 stand for in dotTrace Profiler? -
while using dottrace profiler getting lots of calls namespacename.classname.ctor>b__11
(when used equatec profiler on application got similar results mysterious function being called namespacename.classname.<ctor>b__11
). first assumed constructor of classname
break point inside of constructor of classname
hit once. assuming auto generated function , if how can find gets called? relation have constructor of classname
if constructor gets called once?
it's lambda declared in constructor. did subscribe event in constructor using =>
syntax, or else called frequently?
when use lambda, c# compiler turns private method, , uses delegate method. (and other fancy tricks if you're doing variable capture.)
looking @ other classes in reflector, looks c# compiler numbers each lambda when turns them methods, naming convention you've noticed, <methodname>b__<number>
, numbering each 1 goes.
Comments
Post a Comment