VOOZH about

URL: https://stackoverflow.com/tags/cil

⇱ Newest 'cil' Questions - Stack Overflow


Collectivesβ„’ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives
0 votes
0 answers
39 views

I found out about this instruction today and wanted to try it out. Sadly, ILASM doesn't seem to recognize it. That's why I decided to manually patch the generated assembly to add in the instruction. I ...
  • 172
1 vote
0 answers
110 views

I find myself occasionally annoyed by the empty constructor of C# struct types. Unlike classes, there's no way enforce that struct fields are initialized to non-default values, since all structs have ...
1 vote
1 answer
72 views

In a program I'm writing, I'm faced with a recursive type that I want to go through recursively (it seems necessary). Out of curiosity, I wanted to try and write a tail recursive version of my code, ...
4 votes
1 answer
127 views

According to boxing on structs when calling ToString(), calling an unoverridden method on a C# struct causes it to be boxed. This is ultimately because of how the constrained callvirt IL instruction ...
1 vote
1 answer
1k views

I'm working with VS 17.11, and MAUI 8. There are a lot of articles about "dependency injection", including on a platform basis. But something like this seems possible too: #if IOS ...
1 vote
1 answer
134 views

When I was conducting the following benchmark test, the benchmark information indicated that there was no additional memory allocation. However, doesn't converting a struct to an interface involve ...
1 vote
1 answer
56 views

I'm trying to use Mono.Cecil to weave in some instrumentation code into existing methods - basically just a log before all the sequence points. This is simple, I can iterate over all of the sequence ...
0 votes
0 answers
84 views

In the preceding C# code, I'm creating a dynamic method and adding a few IL instructions to it, and then invoking the dynamic method: var assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new(&...
-2 votes
1 answer
143 views

In C# one can make a positive int negative using the minus sign - like so: var positiveInt = 5; var negativeInt = -positiveInt; Is there an extra operation taking place under the hood when doing this ...
3 votes
1 answer
241 views

I used ILSpy on my code from curiosity, and I noticed that if (1 == 0) empty instructions were added around return x switch statements. Here is an example of this behavior: public static string ...
  • 440
0 votes
0 answers
108 views

This question is a follow up on Unhandled exception: System.IO.FileNotFoundException: The file or assembly "System.Private.CoreLib" could not be found in custom generated assmbly. I ...
1 vote
2 answers
97 views

I have this IL code from Expert .NET 2.0 IL Assembler by Serge Lidin: This is in a file called CilTest.il: //----------- Program header .assembly extern mscorlib { auto } .assembly OddOrEven { } ....
0 votes
0 answers
31 views

We have a C#/.NET application running as a Windows Service. Infrequently, it logs several entries of the following form in the Windows Event Viewer. Log Name: Application Source: Windows Error ...
1 vote
0 answers
145 views

I have been using the following method to redirect a C# method into another at runtime: public class Injection { public static void install(MethodInfo methodToReplace, ...
-3 votes
2 answers
169 views

When writing my library, I used a series of ternary expressions: public INumber Level1() { INumber number = Level2(); Next(); return txt == "-" ? new Subtraction(number, Level1(...

15 30 50 per page
1
2 3 4 5
…
105 Next

Hot Network Questions

more hot questions