CIL (Common Intermediate Language) is a low-level language used by Microsoft .NET Framework and Mono.
Questions tagged [il]
477 questions
0
votes
2 answers
Methodnames in Output-Assembly
I am compiling a project with Visual Studio 2013 against .NET 4.5 and then checking it again with ILDASM.
What I noticed is that the build in Release still contains method names and variable names, I thought these should be removed in a…

Patrick Braunstorfer
- 373
- 4
- 17
0
votes
0 answers
.Net different IL but same output. Why?
I have 2 dlls ('original' and 'new') and for one method the IL is very different inside these 2 dlls (not talking about the nop alone but lot of differences). But when I decompile these two dlls then the C# produced is exactly same for these…

Utkash
- 1
0
votes
1 answer
Assigning value to string from base type through constructor using TypeBuilder
I am trying to programmatically define a class with a base class, and a constructor which calls the base constructor. Part of the subclass constructor's job is to initialize a string called name with a value. But no matter what I try name remains…

user1296193
- 33
- 6
0
votes
2 answers
Dynamic extraction optimization of nested properties values
I have small piece of code responsible for dynamic extraction of properties values from objects instances through reflection:
public static object ExtractValue(object source, string property)
{
var props = property.Split('.');
var type =…

jwaliszko
- 16,942
- 22
- 92
- 158
0
votes
2 answers
Local Dim vs. Static variable
From the IL perspective, what are the main differences (performance wise) between a local Dim variable and a local Static variable?
I've always thought that Dim would allocate storage space every time, whilst Static would allocate storage space…

Bjørn-Roger Kringsjå
- 9,849
- 6
- 36
- 64
0
votes
1 answer
.Net tools for decompiling
Are there API tools within the core .Net framework (any version) which help in decompiling code?
Note: I am not looking for an external tool (such as reflector or dotPeek), I am coming from the direction of trying to build an external tool.

Shane
- 875
- 1
- 6
- 24
0
votes
2 answers
How do I Assert equivalence between two EF collections (from procedure results) in C# unit test?
At this moment, I am using NUnit to perform comparisons. (I'm open to using a different unit testing framework for this test.) I am using ILGenerator to dynamically invoke a stored procedure that has been mapped via Entity Framework 6.0. (The stored…

devinbost
- 4,658
- 2
- 44
- 57
0
votes
1 answer
How do I filter EF procedures by return type (e.g. via reflection or IL)?
Let's assume that we already have the stored procedures mapped from a database via Entity Framework 6.0. I am trying to filter stored procedures by their return type and then use the return type to fill a grid via WPF.
Here is the query…

devinbost
- 4,658
- 2
- 44
- 57
0
votes
0 answers
LCG create method to set a subset of all properties in class (reflection substitute; c#)
Scenario: I have this class
public class Person
{
public string FirstName { get; set; }
public string LastName { get; set; }
public int Age { get; set; }
}
User has the ability to only select for example FirstName and Age.
Currently I…

Gustavo
- 685
- 3
- 7
- 17
0
votes
2 answers
Finding a way to use System.Runtime.CompilerServices.CallConvCdecl in Compact Framework
The System.Runtime.CompilerServices.CallConvCdecl doesn't exist in the .Net Compact Framework.
Is there anyway to replicate this function in the Compact Framework?

CathalMF
- 9,705
- 6
- 70
- 106
0
votes
1 answer
IL Opcode Modification
Language: VB.NET 3.5
IL opcodes:
718 ldarg.0
719 callvirt System.Windows.Forms.Button RClient.RClient::get_cmd1()
724 ldarg.0
725 ldfld System.String[] RClient.RClient::ButtonStrings
730 ldc.i4.5
731 ldelem.ref…

Dacto
- 2,901
- 9
- 45
- 54
0
votes
1 answer
Confused about auto property IL accessing two arguments rather than one
Given the following auto property:
public string Name { get; set; }
I analysed it's IL using ILDASM and was curious about the result:
.method public hidebysig specialname instance void
set_Name(string 'value') cil managed
{
.custom…

Jason Evans
- 28,906
- 14
- 90
- 154
0
votes
1 answer
Post sharp IL level interaction
So I'm looking at PostSharp and I noticed that this isn't using runtime generated proxies but it is actually giving hints to the compilation process to include the aspects within the IL.
So my initial thought were wow, how the heck is this done.…

Owen
- 6,992
- 7
- 44
- 77
0
votes
1 answer
ILGenerator - implementing clone method in a dynamic type
I wish to implement a clone method in a dynamic type, but the problem is I can't new up said type before I've declared typeBuilder.CreateType() - I get the exception: System.NotSupportedException : The invoked member is not supported before the type…

George R
- 3,784
- 3
- 34
- 38
0
votes
2 answers
alignment of sections and memory within an EXE file
What are the alignment of sections and memory within an EXE file I need to specify when creating using in the Mosa IL compiler?
Thanks.

Alon Gubkin
- 56,458
- 54
- 195
- 288