I was looking at some IL recently, and noticed a number of odd signatures. There is a "My" namespace, which suggests that the source language might have been VB.NET. However, I have worked exclusively with C# in my managed code.
The relevant IL (approx.), followed by my two questions:
.method private newslot specialname strictvirtual instance class Alpha.Class get_Foo() cil managed { .maxstack 1 .locals init (class Alpha.Class V_0) IL_0000: ldarg.0 IL_0001: ldfld class Alpha.Class Alpha.Bravo::_Foo IL_0006: ret }
As you can see, the IL shows a method with both private and virtual attributes.
- What source language(s) would, in typical compilation, result in this IL?
- What functional differences, if any, between that IL and IL resulting from the use of the "protected" keyword on the method in C#?
I ask because, as far as I can tell, this is a nonsensical combination, yet the IL loads/runs without complaint.
Thanks!
10 years Windows storage drivers | Microsoft Patent Lawyer | LCA - Patents | Microsoft (not giving legal advice)