fatalk1ll3r
asked on
Inline function in VB.NET
I want to know if I can write an inline function in VB.NET.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=NLcbv41CCHA.2264%40cpmsftngxa07&rnum=1&prev=/groups%3Fq%3D%2522inline%2Bfunction%2522%2B%2B%2522VB.NET%2522%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3DNLcbv41CCHA.2264%2540cpmsftngxa07%26rnum%3D1
I think it is not possible in VB.NET