Rajanikant Hawaldar
What is IN type parameter in C#? How does it differ from OUT and REF type parameter in C#?

What is IN type parameter in C#? How does it differ from OUT and REF type parameter in C#?

By Rajanikant Hawaldar in .NET on Mar 07 2021
  • Rajeev Kumar
    Mar, 2023 17

    Ref and out keywords in C# are used to pass arguments within a method or function. Both indicate that an argument/parameter is passed by reference. By default parameters are passed to a method by value. By using these keywords (ref and out) we can pass a parameter by reference.

    • 0
  • suresh boyina
    May, 2021 31

    Out Parameter is used for setting the output value before completion of the function execution.Ref Parameter, the calling function sets the value for this parameter.

    • 0
  • tru vishe
    Mar, 2021 12

    ref is used to state that the parameter passed may be modified by the method. in is used to state that the parameter passed cannot be modified by the method. out is used to state that the parameter passed must be modified by the method.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS