what are <-Cannon> .ctor etc means when I get result
hyang
Posts: 10
Hi,
When I run performance profiler and output data to csv or excel. I saw some very weird words added into method names such as
<Startup>b__3<__Canon>()
Startup()
It<__Canon>(Func<T>)
ResolveAll<__Canon>()
<ResolveAll>b__9<__Canon>()
ResolveAllServices()
<Initialize>b__2<__Canon>()
Initialize()
TryResolveAll<__Canon>()
CreateShell(bool isVisible)
.ctor(IContainer container)
what does ".cctor()", or <_Canon> or b_numbers means
does any body know? or where i can find reference for these? is that possible to show as my normal methods names?
Thanks
When I run performance profiler and output data to csv or excel. I saw some very weird words added into method names such as
<Startup>b__3<__Canon>()
Startup()
It<__Canon>(Func<T>)
ResolveAll<__Canon>()
<ResolveAll>b__9<__Canon>()
ResolveAllServices()
<Initialize>b__2<__Canon>()
Initialize()
TryResolveAll<__Canon>()
CreateShell(bool isVisible)
.ctor(IContainer container)
what does ".cctor()", or <_Canon> or b_numbers means
does any body know? or where i can find reference for these? is that possible to show as my normal methods names?
Thanks
Comments
When you see cctor() method in the results, it essentially means that the method is a constructor
I'm not so sure about <_Canon> or b_numbers -- did these methods come from an assembly that you do not have source for and used the integrated "decompile" option on?
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?
b_ is a compiler generated backing field.
Simple example:
Public string MyString { get; set; }
so becomes something like:
private string b_MyString;
public string get_MyString() { return b_MyString; }
public void set_MyString(string value) { b_MyString = value; }
Red Gate
what about these in the "class"
ConfigService+<>c__DisplayClass10
ConfigService+<>c__DisplayClass16
ConfigService+<>c__DisplayClass5<T>
ConfigService+<>c__DisplayClassd
what do these mean? thanks a lot
Examples of when this is done are: lamba functions, anonymous functions, for keywords like Async and yield.
<> is used at the start of the generated construct names to avoid any collisions with "defined" code; <> is reserved for the compiler for this very purpose.
Red Gate