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

Define constructor in c#.

910


What are circular references?

954


How does bitwise work?

896


What is ienumerable <> in c#?

903


What are the return types in c#?

968


How do I start a program in c#?

997


What is use of FormBoarderStyle Propertie

936


What is private void in c#?

923


Is unboxing an implicit conversion?

1032


What is the console on a mac?

930


What floating point types is supported in C#?

1035


Is var a data type?

945


Define a jagged array in c#?

904


In which way a two-dimensional array declared in C#?

914


If a.equals(b) is true then a.gethashcode & b.gethashcode must always return same hash code.

1024