About 275,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. C# out vs ref: Real-World Examples You’ll Actually Use

    Aug 12, 2025 · These two keywords allow you to pass parameters by reference, but they serve very different purposes. In this article, I’ll walk you through real-world examples of each and …

  6. ref vs out in C# - C# Corner

    Explore the distinction between 'ref' and 'out' keywords in C#. Learn how 'ref' passes arguments by reference for both input and output, while 'out' is used solely for output parameters, aiding …

  7. What Is an Out Parameter in C#? - UMA Technology

    Dec 22, 2024 · To declare an out parameter in C#, you simply add the out keyword before the parameter type in the method signature. Here is an example of a method that uses an out …

  8. Out Variables in C# 7 with Examples - Dot Net Tutorials

    In this article, I am going to discuss the Enhancement of Out Variables in C# 7 with Examples. With the introduction of C# 7

  9. 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 …

  10. 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 …