Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Passing ref to a method

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Passing ref to a method

    Say I have a custom method (e.g. myMethod, returning a given type) that is overloaded with a DataSeries (e.g. myDataSeries).

    In cases where this is permitted, will there be an effect on NT performance if the DataSeries is passed to the method by-reference as opposed to by-value?

    Code:
    i.e. is myMethod(ref myDataSeries) better than myMethod(myDataSeries)?
    Thanks.
    Last edited by AnotherTrader; 07-24-2015, 04:57 AM. Reason: re-phrasing...

    #2
    Hello AnotherTrader,

    Thank you for your post.

    I would not expect a performance issue by passing the reference instead of the value. Both would simply be a reference to the same object either way.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    601 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    347 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    103 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    559 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    558 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X