Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is reference parameter?
what is out parameters?
what is difference these two?

Answer Posted / lakshmi

When we pass a parameter as ref to a method, the method
refers to the same variable and changes made will affect
the actual variable. even the variable passed as out
parameter is same as ref parameter, but implementation in
c# is different,
Arguement passed as ref parameter must be initialized
before it is passed to the method. But in case of out
parameter it is not necessary. But after a call to a method
as out parameter it is necessary to initialize.
When to use out and ref parameter, out parameter is used
when we want to return more than one value from a method.

Is This Answer Correct ?    27 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you achieve run time polymorphism in C#?

1049


How many types of methods are there in c#?

964


What is part of a method signature in c#?

963


Differentiate between sqlclient oledb and providers?

1005


Are tuples immutable c#?

970


Why c# is called c sharp?

942


What is the boxing and unboxing in c#?

940


What are the differences between static, public and void in c#?

1128


What are extender provider components?

947


What are get and set in c#?

1059


What is the difference between “finalize” and “finally” methods in c#?

978


Is as operator in c#?

934


What is typeof c#?

999


Define a manifest in .net?

1059


How can I get the ascii code for a character in c#?

1114