Click here to Skip to main content
15,886,518 members
Everything / Programming Languages / MSIL

MSIL

MSIL

Great Reads

by Steve Marsh
The classes in this project allow you to parse text expressions entered by a user and compile them to a .NET assembly. This assembly can be executed on the fly, or saved to a DLL.
by Jason R. Fruit
Implement a compiling calculator to learn about .NET CIL compilation
by Jonathan de Halleux, Nikolai Tillmann
Pex is a new tool that helps in understanding the behavior of .NET code, debugging issues, and in creating a test suite that covers all corner cases -- fully automatically.
by jconwell
Part 2 of an introduction to creating dynamic types. This article shows how to actually generate the methods in a dynamic type and how to call them.

Latest Articles

by Mark Pelf
Overview of 5 free .NET Decompilers
by Higty
Design mapping rule by test case and write IL code for good performance
by Alexandre Bencz
DotNetPELib is a library which abstracts managed information such as namespaces, classes, fields, methods, and instructions. The information can then be used to generate assembly language source files, or PE executables or DLLs.
by Alexandre Bencz
With this new OrangeC/C++ compiler back-end, you can compile your C code to .NET

All Articles

Sort by Score

MSIL 

6 Jan 2009 by Steve Marsh
The classes in this project allow you to parse text expressions entered by a user and compile them to a .NET assembly. This assembly can be executed on the fly, or saved to a DLL.
26 Jan 2018 by Jason R. Fruit
Implement a compiling calculator to learn about .NET CIL compilation
28 Jan 2009 by Jonathan de Halleux, Nikolai Tillmann
Pex is a new tool that helps in understanding the behavior of .NET code, debugging issues, and in creating a test suite that covers all corner cases -- fully automatically.
1 May 2006 by jconwell
Part 2 of an introduction to creating dynamic types. This article shows how to actually generate the methods in a dynamic type and how to call them.
9 Aug 2013 by Dennis C. Dietrich
Clarifying how the .NET GC identifies objects to collect once and for all... hopefully...
11 Jan 2016 by Den367
Using System.Windows.Media library to create embroidery design of a glyph from true type font file
15 May 2018 by Eric Lynch
Extends .NET reflection to decode the byte array returned by System.Reflection.MethodBody.GetILByteArray(), discusses the techniques to achieve this, and provides a brief primer on .NET reflection.
31 May 2012 by rcarlson-cayen, Cayen Systems
This article details how to make a legacy code base more maintainable by utilizing a JSON architecture.
6 Apr 2017 by matt warren
Whilst writing a previous blog post I stumbled across the .NET Interpreter, tucked away in the source code.
5 Jul 2020 by Higty
Design mapping rule by test case and write IL code for good performance
14 Sep 2018 by wmjordan
Circumventing language obstacles and optimizing performance with Dynamic Methods, Dynamic Assemblies.
25 Nov 2009 by Aviad P.
Post an article about it - I am sure creative people will find good uses for it.
16 Nov 2012 by Sergey Alexandrovich Kryukov
Hard to say exactly why the timing results are as you observe them, but I can see one problem: you time the calls of the method incorrectly, because you don't take into account the time taken by JIT. Again, both methods are eventually JIT-interpreted, so it's pretty hard to explain why the...
17 Nov 2012 by Alan N
I modified your code slightly so that it could be compiled using all .NET versions.With .NET2 and 3.5 there was no difference in execution time between the standard and dynamic methods, both taking about 1400 - 1500ms in release mode.However .NET 4 (v4.0.30319) was a different story...
26 Oct 2020 by OriginalGriff
Yes it can be done: just because something isn't directly supported by the processor doesn't mean you can't use it in assembler - think about a BigInt value where each decimal digit is stored in a nibble - so two digits fit in a byte - and an...
26 Oct 2020 by KarstenK
There is support in some C++ libraries like Boost for that. Some compilers are not handling exact sizes for data types, but are using alignment. The advantage is that full bytes are used and so the processing speed is better, because no efforts...
8 Mar 2011 by Espen Harlinn
How To: (Almost) Everything In WMI via C# - Part 3: Hardware[^] allows you to detect whether your computer is connected to a network - remember the computer may be connected to a network without being able to access the internet.The...
28 Dec 2012 by Sergey Alexandrovich Kryukov
Who told you that that stdio is available, through reimplementing it via .NET BCL, System.IO, System.Console or something like that?I suggest you use System.IO and System.Console directly instead. Give it a try.—SA
9 Mar 2018 by #realJSOP
Google is your friend: c# object defaults - Google Search[^]
9 Mar 2018 by Afzaal Ahmad Zeeshan
Apart from what John suggested in Solution 1, please also read about value-types and the reference-types in .NET framework context. In the context, if the developer leaves out the initialization step and only performs declaration, the default value is assigned — which is obvious. I am not an...
8 Mar 2011 by fjdiewornncalwe
I wouldn't bother with a thread. If the connection attempt fails, you can simply tell the user that the connection to the database is not available and to restart the application later. Then you can either close the app yourself or let the user close it and then restart it later. Whether or not...
25 Mar 2011 by Abhinav S
Have a look at the NGEN tool[^].
25 Mar 2011 by OriginalGriff
If you are sure it is the algorithms that are slowing things down (and you would be surprised how often it turns out to be something else entirely) then the best course of action is to recode them into a DLL in a native language, and call that from your C#. Profile it first, and check that...
10 Nov 2011 by zenwalker1985
I have found a few interesting things which I would like to share with you all.
27 Dec 2012 by Alexandre Bencz
Hi, I'm playing with lcc compiler for .net http://research.microsoft.com/en-us/downloads/b994fbbf-f7bb-4a4a-998c-2f6a6d340ec6/[^]https://sites.google.com/site/lccretargetablecompiler/[^]So, but, when I try to build the il generate code, I got that erro:C:\lcc>set...
30 Sep 2013 by Imre S Lengyel
Use ILSpy to perform a more comprehensive check on Emitted assembiles
23 Feb 2014 by Thomas Daniels
Probably there is something wrong with the given input. You can use parameterized queries to avoid this. Using parameterized queries also protects your application against SQL Injection[^], and it also makes your query more readable.OleDbCommand oleDbCmd = new...
5 Dec 2014 by Abhinav S
These beginner links should help you -ASP.NET MVC - Controllers[^]Controllers and Action Methods in ASP.NET MVC Applications[^]ASP.NET MVC Controller Overview (C#)[^]
26 Oct 2020 by deXo-fan
Hello, Well, the title of this question is perhaps self explanatory, but at the same time I already know the answer to that question is "No". So allow me to elaborate my question and goal a bit. There used to be a 12-byte integer type in C++ a...
26 Oct 2020 by Patrice T
Quote: There used to be a 12-byte integer type in C++ a few years back, at least in Microsoft's compiler. But even then that didn't make sense, because as you know, C++ is converted to Assembly code, and the two largest integer types in Assembly...
16 Jun 2007 by NineRays, Mark Sochan
Most .NET software projects can easily be tampered, exposing your software to security risks and theft of intellectual property. This article shows different techniques used to protect .NET code and determine the best protection for you. 9rays.Net offers you Spices.Obfuscator to these ends.
1 Jul 2010 by emicroxxx
Transforming ILMerge.exe to DLL [for convenient usage only]
12 Apr 2010 by zebamuskan
how can we implement media player in our windows mobile application.
25 Mar 2011 by Nick Reshetinsky
Hi guys!I'm creating an application which has a bunch of complex algorithms that require pretty much time to execute ... I know that C# code (MSIL) is converted to machine code due to CLR..but how can I manually precompile my critical and complex methods into machine code at...
25 Mar 2011 by Rick Shaub
NGEN is the tool for generating machine code. However, in some cases NGEN can cause code to be less optimized than if you used JIT. Mainly because JIT can take advantage of processor model specific instructions, whereas NGEN creates code for a family of processors. Also, NGEN complicates the...
28 Feb 2012 by dare2dash
is swiching over to android apps dev is good ,i'm new in this field
28 Feb 2012 by CPallini
In my personal opinion, yes, it is good. However you should really check the job opportunities locally, in your Country.
28 Feb 2012 by Shameel
It depends on what your interests are. If you have a flair for programming then you can definitely learn android development, that doesn't necessarily mean that you have to give up what you are currently working with.
28 Feb 2012 by Mehdi Gholam
Currently Android has around 50% market share on mobile devices. http://www.dailytech.com/Android+Market+Share+Reaches+56+Percent+RIMs+Microsofts+Cut+in+Half/article22852.htm[^]So choosing to develop for that platform is a good option, the real question is how good you are at development...
28 Feb 2012 by Bernhard Hiller
Think of your time horizont!When I wrote my first lines of code more than 30 years ago, software development was really different from what it is now: Object oriented programming, graphical user interface, internet, ...What ever you chose now, be prepared for a changing future, and stay...
2 Jul 2012 by Pieter Van Parys
How to generate assemblies at runtime using IL emit
29 Aug 2012 by aLcoHolicDevil
I am working with sqlbulkOperations, I got one code from msdn but i have to change database to .mdb how do i do that, For instance i want to pass database name as c:\test\test.mdb instead of NorthWind here. retcode = SQLConnect(hdbc, (SQLCHAR*) "Northwind", SQL_NTS, (SQLCHAR*) NULL, 0,...
29 Aug 2012 by JackDingler
Run odbcad32.exe and add your database as a DSN, and use the name you provide for the DSN, in your code.Connecting with SQLConnect[^]
20 Dec 2012 by Rocky_Bas
Hello,How to turnoff the Safe Mode option in windows 7 machine.Thanks in Advance.
20 Dec 2012 by AnkitGoel.com
This may...
23 Jun 2013 by jagdish123061
Hello guys I had uploaded my asp.net website and database to server using core ftp.I had modified my database and trying to upload it to the server using core ftp but it is displaying error like 'Could not access file because it is used by another process'.because when some one opens...
29 Aug 2013 by SNI
I have SDI form based (CFormView) application which has initial size is set to 736*530 and I am able to make full screen but want restrict it to 736*530. The screen shd not smaller than 736*530 size. How to limit minimum screen SDI size to 736*530
24 Sep 2013 by Maximilien
What abou a CBitmapButton ?If you want a full bitmap button you will have to "owner draw" it.Just google it; there are tons of examples here on code project.
18 Feb 2014 by rizwanahmadintagleo
Hey Guys.Hope you are doing great.I have seen/heard the followings advantages of first converting c#(or vb.net) code to MSIL 1)Resource Management2)object life time management3)Reflection4)Typesafe5)Debugging optionsam i right and can anybody put some light(or Explain)...
18 Feb 2014 by Mehdi Gholam
Both 1,2 have nothing to do with MSIL and there is no benefit since they are handled by the CLR (common language runtime) and BCL (base class libraries) internally.Generally you don't need to know IL unless you are doing runtime code generation or reverse engineering.
23 Feb 2014 by Dumpala Charan
if you are using msaccess as Database execute the query in that so that you will get to know the problem in that. or Try by keeping square brackets to the coloum names. Hope it will help you.
29 Jul 2014 by sreedharmasula
how can I give validations to the dropdown list in mvc.
29 Jul 2014 by Dileep Ashok
Hi..You can use data annotation validation in MVC.like[Required(ErrorMessage = "Please select at least one option")] public int ddlId{ get; set; }
5 Dec 2014 by Vivek S Kale
if you want to implement MVC like struture in ASP.NET how will you call controller
24 Apr 2016 by Member 11873265
How to edit a value/field in a configuration file using wix . My research: my custom dialog which ask for user input will be as:The user entered value should be Send to custom action. public class CustomActions { [CustomAction] public static ActionResult SaveUserInfo(Session...
24 Apr 2016 by Member 11873265
How to check for a availability of port When Server address or IP address is given as input by a user. My Research: A custom action should be implemented A custom dialog should be created in Wix which has a editbox and save the text in a property Send the property value to the custom action...
24 Apr 2016 by Prasad Khandekar
Hello,Here is a nice[^] tip on this site. Here is another[^] in CPP.Regards,Prasad P. Khandekar
28 Jul 2017 by The_Unknown_Member
Im wondering how the MSIL is running without being compiled firstly ? As I know .NET uses a JIT compiler and the JIT compiler is both interpreter and compiler which runs after the program start (in run-time). So how the MSIL is getting executed ? What I have tried: Asking a question here in...
28 Jul 2017 by OriginalGriff
Quote: So how the MSIL is getting executed ? There is a wealth of resources on t'internet which explain this: Code Execution Process[^] provides a nice overview, but Google can find you more details. Quote: Can you also explain me how the Assembly code executes ? For example lets assume we have...
9 Mar 2018 by The_Unknown_Member
When you create a class with some fields that don't have any value explicitly specified by the developer they are defaulted to their default values (for Int32 it's zero). So my question is how do they get defaulted? Does the C# compiler do something behind the scenes in the process of compiling?...
1 Feb 2021 by Kevin Brady
I have downloaded and installed the latest version of MSSQL Server Management Studio. From the information that I found on-line, this should have installed all of SMO. Is this correct? I cannot find the dll "Microsoft.SqlServer.Management". ...
2 Feb 2021 by RickZeeland
It could be in: Microsoft.SqlServer.SmoExtended.dll See: Transfer Class (Microsoft.SqlServer.Management.Smo) | Microsoft Docs[^] The problem with using SMO is that it can change depending on the SQL Server version you have installed, for that...
17 Dec 2021 by Member 15265176
I am using PRINTDLG library for an old windows application, that has to print some files. I configured it in a way that it pick up the default printer and print the document without showing any dialog box. But the problem is when there is no...
17 Dec 2021 by Rick York
The standard system dialogs allow one to use hook procedures so it would seem like you could utilize a hook procedure and potentially adjust some items from the dialog ie., remove them from consideration. According to the docs : PRINTDLGA...
10 Jul 2016 by Florian Rappl
This article introduces MAGES - a very simple, yet powerful, expression parser and interpreter.
23 Jun 2009 by Ziad Elmalki
Replace any method with another method at runtime. Updated for 3.5 SP1.
22 Jun 2014 by Nathaniel Moschkin
Topics and methods on programming in .NET and performance considerations
7 Aug 2014 by Jerry.Wang
Modify methods' IL codes on runtime even if they have been JIT-compiled, supports release mode / x64 & x86, and variants of .NET versions, from 2.0 to 4.5.
23 Jan 2016 by Afzaal Ahmad Zeeshan
C# 6 has been available for a long time, by now! Many developers have written many guides to "list" the features. I have written this post to explain those features, and to explain whether they are actually new or are they just sugar coating to the compiler.
24 Nov 2011 by Sebastian Solnica
The article describes how to make a slideshow in a debugger. It may help you understand the PDB API in System.Reflection.Emit as well as impress listeners on any debugging-related presentations. :)
16 Sep 2015 by Ed Nutting
In this article I discuss the innovative approach, taken by FlingOS, to teaching OS and low-level development to high-level developers using C#.
1 Mar 2015 by mbarbac
The seventh version of the dynamic, configuration-less and self-adaptive Kerosene ORM library, that provides full real support for POCO objects, natural SQL-like syntax from C#, and advanced capabilities while being extremely easy to use.
16 Dec 2013 by Florian Rappl
A close look at some powerful features of C# that are less known but sometimes come in very handy
2 Mar 2023 by Mark Pelf
Overview of 5 free .NET Decompilers
1 Sep 2006 by jconwell
This tool analyses the IL of a list of assemblies, looking for types, methods, and fields that are not used by another list of assemblies. This lets you see if you have unused legacy code lying around that should be cleaned up.
4 May 2008 by Sasha Goldshtein
In this article, we will look into JIT optimizations, with specific focus on inlining.
4 Dec 2006 by Alexey A. Popov
This article is dedicated to the observable property design pattern, a very nice pattern used in the Microsoft .NET Framework, a possible memory leak problem with it, and gives a couple of ways to solve it.
17 Dec 2019 by Alexandre Bencz
With this new OrangeC/C++ compiler back-end, you can compile your C code to .NET
2 Jan 2020 by Alexandre Bencz
DotNetPELib is a library which abstracts managed information such as namespaces, classes, fields, methods, and instructions. The information can then be used to generate assembly language source files, or PE executables or DLLs.
11 Feb 2013 by Sander Rossel
Journey to the center of the .NET Framework with a chance of IL along the way!
18 Apr 2003 by Sameers Javed
Start using IL Assembly Language to debug your code at low level and understand how .NET deals with your high level code
26 Apr 2013 by Sebastien Lebreton
Reflexil is an assembly editor and runs as a plug-in for Reflector or JustDecompile. Reflexil is able to manipulate IL code and save the modified assemblies to disk. Reflexil also supports "on-the-fly" C#/VB.NET code injection.
16 Oct 2013 by tcassisi
Generating typed field accessors and applying them to object mapping and SQL Stored Procedures
30 May 2008 by Daniel Pistelli
An article about .NET internals and native compiling.
3 Apr 2014 by Kemeny Attila
Generate proxy class dynamically which implements interface
4 Nov 2015 by Pedro Benevides
It is important to know how things work behind the scenes in .NET.
5 Nov 2016 by Arun Endapally
How to protect your source code from decompiling or reverse engineering
24 Nov 2014 by Jeremy Falcon
A beginner's guide to talking like a computer.
10 Aug 2009 by Stefan Simek
RunSharp (or Run#) is a high-level wrapper around the Reflection.Emit API, allowing you to generate code at runtime quickly and easily.
14 Mar 2017 by Vikas Sharma
In this article we will make a Visual Studio extension(Visual Studio VSIX Package) that would notify us for our emails in VisualStudio Status bar
14 May 2008 by Daniel Pistelli
An article about .NET internals and code injection
1 Mar 2015 by mbarbac
A deep dive tutorial on Kerosene ORM Dynamic Records and other core concepts of the library
28 Jun 2007 by Sorin Serban
This article shows how to get a readable and programmable result from the IL array provided by the MethodBody.GetILAsByteArray() method.
2 Nov 2011 by Rene Pally
Advanced .NET Debugging Extracting Information from Memory
16 Aug 2011 by Reto Ravasio
A WPF app that uses dynamic types and databinding for displaying MSI files.
22 Mar 2005 by James Nies
Reflecting on Properties is nice, but often it can be too slow. This article describes an alternative method for dynamic property access.
7 May 2019 by Florian Rappl
Want to modernize your C# codebase? Let's continue with methods.