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
Why do we use interfaces in c#?
How big is a float?
What is yield return in c#?
Is as operator in c#?
I need code to connect ohter systems in the LAN and i want to display my website image over there and i want explain as a admin through phone. So i need code to access other system using C-Sharp. Any one please help me.Please give me the code. Advace thanks.
What are satellite assemblies? How will you get the different language strings?
What is strongly typed view?
Can arraylist store different data types in c#?
What is generic delegates in c#?
Explain anonymous type in c#?
What debugging tools come with the .NET ssSDK?
Define c# delegate?
What is default boolean value in c#?
What is Asynchronous call and how it can be implemented using delegates?
What is different between Static Constructor and Private Constructor?