Home > DeveloperSection > Interviews > What do you mean by inline function?

Posted on    January-15-2015 10:18 PM

 .NET C# 
 1 Answer(s)
  545  View(s)
Rate this:

Ankit Singh

Total Post:15

Posted on    January-15-2015 11:18 PM

  Inline function

An inline function is a combination of macro & function. At the time of declaration or definition, function name is preceded by word inline.
When inline functions are used, the overhead of function call is eliminated. Instead, the executable statements of the function are copied at the place of each function call. This is done by the compiler.

The idea behind inline functions is to insert the code of a called function at the point where the function is called. If done carefully, this can improve the application's performance in exchange for increased compile time and possibly (but not always) an increase in the size of the generated binary executables.

Modified On Mar-28-2016 04:21:25 AM

Don't want to miss updates? Please click the below button!

Follow MindStick