Solved

Inline function in VB.NET

Posted on 2003-11-12
4
1,171 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
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:…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now