1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

c# can you force a function to NOT be inlined?

Discussion in 'C#' started by codeunlock, Apr 29, 2007.

  1. codeunlock

    codeunlock New Member

    Joined:
    Apr 18, 2007
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    Can I force a function to NEVER be inlined?

    I want the call stack returned by:
    System.Diagnostics.StackTrace callStack = new
    System.Diagnostics.StackTrace();
    to be such that:
    System.Diagnostics.StackFrame frame = callStack.GetFrame(0);

    is the function itself, NOT the function's caller (due to a release build making the function inlined into its caller)!

    thanks!
     

Share This Page