About 424,000,000 results
Open links in new tab
  1. out keyword - C# reference | Microsoft Learn

    Mar 30, 2024 · out (C# Reference) You can use the out keyword in two contexts: As a parameter modifier, which lets you pass an argument to a method by reference rather than by value. In …

  2. Out Parameter With Examples in C# - GeeksforGeeks

    Jul 11, 2025 · Multiple out Parameters: In C#, a user is allowed to pass multiple out parameters to the method and the method returns multiple values. Example: In the below code, we declared …

  3. c# - out var _ and out _ difference? - Stack Overflow

    Feb 15, 2018 · The reason for this is that out _ already had a meaning, and the language maintains backward compatibility with that old meaning. But out typename identifier is new …

  4. Mastering C# Fundamentals: the `out` Keyword - DEV Community

    Sep 29, 2024 · The out keyword allows passing parameters by reference in C#. Unlike the ref keyword, the out keyword doesn't require the argument to be initialized before passing it to a …

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

    Feb 27, 2025 · The out keyword also passes a parameter by reference, but with a twist: You don’t need to initialize the variable before passing it into the method (although you still must declare it).

  6. C# 7 ref And out - C# Corner

    ‘ref’ & ‘out’ keywords are very popular & useful in C# and some more enhancement has been done for ref & out in C# 7. I am going to explain all the basic concepts & usage of ‘ref’ and ‘out’ …

  7. C# Language Tutorial => out var declaration

    It allows a variable to be declared at the same time that is it passed as an out parameter. A variable declared this way is scoped to the remainder of the body at the point in which it is …

  8. docs/docs/csharp/language-reference/keywords/out.md at main · …

    The following limitations apply to using the out keyword: out parameters are not allowed in asynchronous methods. out parameters are not allowed in iterator methods. Properties cannot …

  9. c# - Out parameters and exceptions - Stack Overflow

    Jan 18, 2012 · The out keyword causes arguments to be passed by reference. This is similar to the ref keyword, except that ref requires that the variable be initialized before being passed.

  10. out keyword (generic modifier) - C# reference | Microsoft Learn

    Sep 15, 2021 · For generic type parameters, the out keyword specifies that the type parameter is covariant. You can use the out keyword in generic interfaces and delegates. Covariance …