About 7,270,000 results
Open links in new tab
  1. c# - Return Variable From Method - Stack Overflow

    You can simply return the value from a method. as SLaks suggested. Just use the function itself to return the value. You do not need an additional output parameter. updatestatement = ""; …

  2. C# Return Values - W3Schools

    If you want the method to return a value, you can use a primitive data type (such as int or double) instead of void, and use the return keyword inside the method: …

  3. Returning a Result from a Method · Programming Basics with C#

    In order to obtain a result from the method we need to use the return operator. It should be used in the body of the method and tells the program to stop its execution and to return the method …

  4. C# Return – How to leave a function/method and return values

    Oct 4, 2021 · The many ways to return from a function/method in C#, including returning simple value, yield return and returning multiple values.

  5. Create C# methods that return values - Training | Microsoft Learn

    Learn to create methods that return values. Experience using the Random class to generate a random number. This module covers the return keyword and returning values from methods.

  6. C# method to return var - Stack Overflow

    Jun 13, 2018 · You could change the return type of your method without affecting its functionality: public string[] m_DEMO_Return_var_method(string vpSchemaName, string vpTableName) …

  7. Declare A Function With Return Value In C#

    Jul 26, 2023 · In C#, declaring a function with a return value is crucial to automate and execute a specific task efficiently. This article will provide a simple introduction on how to declare a …

  8. Understanding How to Return Function Values to Variables in C#

    Learn how to effectively return values from functions in C# and resolve common issues with variable assignment.---This video is based on the question https:...

  9. Understanding C# Class Method Return Values

    Jul 22, 2024 · You can assign the return value to a variable, use it in subsequent calculations, or pass it as an argument to another method. Return values provide a flexible way to transfer …

  10. c# - How do I assign the returned value of a function to a variable

    Oct 23, 2012 · You need to assign the return values to some variable in your code and then display the values of those variables in Console.WriteLine. Otherwise they will be lost. …

Refresh