Solved

Inline function in VB.NET

Posted on 2003-11-12
4
1,175 Views
Last Modified: 2010-05-18
I want to know if I can write an inline function in VB.NET.
0
Comment
Question by:fatalk1ll3r
  • 3
4 Comments
 
LVL 5

Expert Comment

by:rajaamirapu
ID: 9731025
0
 
LVL 22

Expert Comment

by:_TAD_
ID: 9731790


Actually it is possible.

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

Expert Comment

by:_TAD_
ID: 9731846

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.
0
 
LVL 22

Accepted Solution

by:
_TAD_ earned 50 total points
ID: 9731891


Here is a web page that confirms my statement:
http://www.codeproject.com/dotnet/strings.asp?print=true

search page for "inlines"
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question