Inline function in VB.NET

I want to know if I can write an inline function in VB.NET.
Who is Participating?
_TAD_Connect With a Mentor Commented:

Here is a web page that confirms my statement:

search page for "inlines"

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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.