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#?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between array and arraylist in c#?

1009


What is appdomain in c#?

961


what is object-oriented programming (oop) language?

920


Can abstract class be instantiated c#?

987


What is difference between c and c sharp?

1019


What is difference between encapsulation and abstraction in c#?

1011


What is difference between .net and c#?

975


What is difference between assembly and namespace?

981


Explain what are three test cases you should go through in unit testing?

995


What is parseexact c#?

1063


What is meant by collections in c#?

907


What is value c#?

886


Why we use get set property in c#?

987


What are strongly typed objects?

982


How can we make a thread sleep for infinite period ?

1038