About 199,000 results
Open links in new tab
  1. The multiple uses of the `ref` keyword - C# reference

    Aug 1, 2024 · Understand the different uses for the `ref` keyword and get more information on those uses

  2. c# - Why use the 'ref' keyword when passing an object? - Stack Overflow

    By using the ref keyword with reference types you are effectively passing a reference to the reference. In many ways it's the same as using the out keyword but with the minor difference that there's no …

  3. ref in C# - GeeksforGeeks

    Jul 11, 2025 · The ref keyword in C# is used for passing or returning references of values to or from Methods. Basically, it means that any change made to a value that is passed by reference will reflect …

  4. C# - ref Keyword - Dot Net Perls

    Aug 15, 2025 · The ref -keyword allows us to pass variable references, as opposed to object references. The storage location of the variable itself is copied on the method invocations.

  5. Understanding the 'ref' Keyword in C# and Its Relationship with 'this'

    Aug 7, 2024 · In C#, the ref keyword is used to pass arguments by reference. When a parameter is passed using ref, any changes made to the parameter within the method will reflect in the calling …

  6. C# ref Keyword

    "The ref keyword causes an argument to be passed by reference, not by value. The effect of passing by reference is that any change to the parameter in the called method is reflected in the calling method."

  7. Ref Keyword in C# - TutorialsTeacher.com

    A variable must be assigned a value before passing as an argument with the ref keyword. We must specify the ref keyword when passing to the method. Otherwise, it will give a compile-time error.

  8. c# - What's the difference between the 'ref' and 'out' keywords ...

    Dec 23, 2008 · Ref: The ref keyword is used to pass an argument as a reference. This means that when value of that parameter is changed in the method, it gets reflected in the calling method.

  9. C# Ref Keyword: Pass by Reference Guide - Blog - Silicon Cloud

    In C#, using the “ref” keyword allows parameters to be passed by reference instead of by value. With the “ref” keyword, a method can modify the value of the parameter passed to it, and these modifications …

  10. Understanding the ref and out Keywords in C# - Medium

    Feb 27, 2025 · Both allow pass-by-reference, but each does so in a slightly different way. In this blog post, we’ll explore what these keywords do, how they differ, and why you might use them.