Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3673090
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:41:23+00:00 2026-05-19T02:41:23+00:00

can somebody please explain what is the difference between the following mechanisms of passing

  • 0

can somebody please explain what is the difference between the following mechanisms of passing arguments: by value, by result, by result-value, with examples if possible, thanks in advance

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T02:41:24+00:00Added an answer on May 19, 2026 at 2:41 am

    For general info see Evaluation strategy.

    For example code you can check HERE.

    Also C# language specification can be useful :

    5.1.4 Value parameters

    A parameter declared without a ref or
    out modifier is a value parameter. A
    value parameter comes into existence
    upon invocation of the function member
    (method, instance constructor,
    accessor, or operator) or anonymous
    function to which the parameter
    belongs, and is initialized with the
    value of the argument given in the
    invocation. A value parameter normally
    ceases to exist upon return of the
    function member or anonymous function.
    However, if the value parameter is
    captured by an anonymous function
    (§7.15), its life time extends at
    least until the delegate or expression
    tree created from that anonymous
    function is eligible for garbage
    collection. For the purpose of
    definite assignment checking, a value
    parameter is considered initially
    assigned.

    5.1.5 Reference parameters

    A parameter declared with a ref
    modifier is a reference parameter. A
    reference parameter does not create a
    new storage location. Instead, a
    reference parameter represents the
    same storage location as the variable
    given as the argument in the function
    member or anonymous function
    invocation. Thus, the value of a
    reference parameter is always the same
    as the underlying variable. The
    following definite assignment rules
    apply to reference parameters. Note
    the different rules for output
    parameters described in §5.1.6.

    • A variable must be definitely assigned
      (§5.3) before it can be passed as a
      reference parameter in a function
      member or delegate invocation.

    • Within a function member or anonymous function, a reference
      parameter is considered initially
      assigned.

    Within an instance method or instance
    accessor of a struct type, the this
    keyword behaves exactly as a reference
    parameter of the struct type (§7.6.7).

    5.1.6 Output parameters

    A parameter declared with an out
    modifier is an
    output parameter. An output parameter
    does not create a new storage
    location. Instead, an output parameter
    represents the same storage location
    as the variable given as the argument
    in the function member or delegate
    invocation. Thus, the value of an
    output parameter is always the same as
    the underlying variable. The following definite
    assignment rules apply to output
    parameters. Note the different rules
    for reference parameters described in
    §5.1.5.

    • A variable need not be definitely assigned before it can be passed as
      an output parameter in a function
      member or delegate invocation.
    • Following the normal completion of a function member or delegate
      invocation, each variable that was
      passed as an output parameter is
      considered assigned in that execution
      path.
    • Within a function member or anonymous function, an output
      parameter is considered initially
      unassigned.
    • Every output parameter of a function member or anonymous
      function must be definitely
      assigned (§5.3) before the function
      member or anonymous function
      returns normally.

    Within an instance constructor of a
    struct type, the this keyword behaves
    exactly as an output parameter of the
    struct type (§7.6.7).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can somebody please explain with examples (of code) what is the difference between deadlock
can somebody please explain me the difference between the following code snippets for filling
Can somebody please explain to me the difference between: Session.Add(name,txtName.text); and Session[name] = txtName.text;
I'm a little bit confused, can somebody please explain the main difference between those
can somebody please explain what is the difference between freeglut.h and glut.h
Can somebody please explain what is the main difference between visual studio and Qt?
Can somebody please explain (with example) the difference between context-independent and context-dependent overloading?
can somebody please explain difference between those two declarations in the properties of the
Can somebody please explain me the difference between keytool command genkey and selfcert, where
Can somebody please explain me the difference between the terms high memory and high

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.