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 are the two keywords used to pass a variable by
reference in c#?

Answers were Sorted based on User's Feedback



What are the two keywords used to pass a variable by reference in c#?..

Answer / sreekanth m

Two keywords are "ref" and "out".

the difference between them are: In the case of "ref", the
passed argument should be initialized first whereas
for "out", its not mandatory.

Is This Answer Correct ?    10 Yes 1 No

What are the two keywords used to pass a variable by reference in c#?..

Answer / pramod singh

A variable of a reference type does not contain its data
directly; it contains a reference to its data. When you pass
a reference-type parameter by value, it is possible to
change the data pointed to by the reference, such as the
value of a class member. You cannot change the value of the
reference itself; that is, you cannot use the same reference
to allocate memory for a new class and have it persist
outside the block. To do that, pass the parameter using the
ref (or out) keyword. For simplicity, the following examples
use ref.

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Is it possible to have a static indexer in c#? Allowed in c#.

0 Answers  


When do you absolutely have to declare a class as abstract (as opposed to free-willed educated choice or decision based on UML diagram)?

1 Answers  


What is a namespace server?

0 Answers  


C# called c sharp why?

0 Answers  


What is fcl in c#?

0 Answers  


What is difference between private, protected, and public in C#?

0 Answers   B-Ways TecnoSoft,


Constructor to an arbitrary base constructor?

0 Answers  


What is hash c#?

0 Answers  


What you mean by delegate in c#?

0 Answers  


What do you understand by an Implicit Variable?

0 Answers   CGI,


When would you use generics in your code c#?

0 Answers  


Explain concurrency with aop?

0 Answers  


Categories