ref vs out in C#

added by DotNetKicks
8/11/2021 5:21:43 PM

479 Views

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 comments