Link to home
Start Free TrialLog in
Avatar of fatalk1ll3r
fatalk1ll3r

asked on

Inline function in VB.NET

I want to know if I can write an inline function in VB.NET.
Avatar of rajaamirapu
rajaamirapu



Actually it is possible.

The .Net Architexture automatically inlines functions if they are smaller than a certain byte size.

From MSDN:

"The JIT compiler automatically inlines any non-virtual method calls that consist of simple control flow and consists of less than 32 bytes of IL instructions."



In order to find out how many bytes of IL instructions a function is, use the ILDASM.exe program (it comes with .Net Framework).  Point it at your compiled project and be sure to set the properties to show the size of the function.
ASKER CERTIFIED SOLUTION
Avatar of _TAD_
_TAD_

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial