Ref and Out in C# - DotNetTricks

Free

Rohit bhatt's profile

No user Photo
Location:
March 24, 2022
Listings: 56
ID: 14749
April 15, 2022

Description

Ref and out parameters are used to pass an argument within a method. The ref keyword is used to pass an argument as a reference. This means that when value of that parameter is changed in the method, it gets reflected in the calling method. The out keyword is also used to pass an argument like ref keyword, but the argument can be passed without assigning any value to it.


Useful information

This site is never involved in any transaction, and does not handle payments, shipping, guarantee transactions, provide escrow services, or offer "buyer protection" or "seller certification"