?
Solved

Inline function in VB.NET

Posted on 2003-11-12
4
Medium Priority
?
1,204 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 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 150 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month17 days, 2 hours left to enroll

864 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