1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nataly [62]
3 years ago
7

Reference variables allow arguments to be passed by ____________.

Computers and Technology
1 answer:
son4ous [18]3 years ago
7 0

Answer:

Reference

Explanation:

The Reference type variable is such type of variable in C# that holds the reference of memory address instead of value. Examples for reference type are classes, interfaces, delegates and arrays.

We can pass parameters to the method by reference using <em>ref </em>keyword

It’s mandatory to initialize the variable value before we pass it as an argument to the method in c#

For example,

int x = 10;  // Variable need to be initialized

Add(ref x); // method call

If you pass parameters by reference in method definition, any changes made to it affect the other variable in method call.

Here's a sample program:

using System;

namespace ConsoleApplication

{

   public class Test

   {

       public static void Main()

       {

           int i = 10;

           Console.WriteLine("i=" + i);

           Add(ref i);

           Console.WriteLine("i=" + i);

           Console.ReadLine();

       }

       public static void Add( ref int j)

       {

           j = j + 10;

           Console.WriteLine("j="+j);

       }

   }

}

Output:

i=10

j=20

i=20

You might be interested in
Can development and conservation of environment go hand-in-hand? Explain your point of view
Wewaii [24]

No, development and conservation of environment cannot hand in hand.

Explanation:

Because during the developmental process the destruction of the environment is necessary.For example,if you want to construct a Road which is one of the developmental activity,so to construct road the clear of forest is must .

5 0
3 years ago
I need Help Right now!!!!!!!!!!!!!!!!!!!!!!!!!
Vikki [24]
Analog<span> and </span>digital<span> signals are used to transmit information, usually through electric signals. In both these technologies, the information, such as any audio or video, is transformed into electric signals. The </span>difference between analog and digital<span> technologies is that in analog technology, information is translated into electric pulses of varying amplitude. In digital technology, translation of information is into binary format (zero or one) where each bit is representative of two distinct amplitudes. analog vs digital</span>
5 0
4 years ago
. Find the supplements of : 150' and 70°​
suter [353]
30 is the supplement of 150
7 0
3 years ago
Which button do you use to put data in a specific order
3241004551 [841]
<span>arrange a list of names in alphabetical order, compile a list of product inventory levels from highest to lowest, or order rows by colors or icons</span>
8 0
3 years ago
My mom and I are moving and we don’t have WiFi for the next week, I want to know if using a using a HOTSPOT WITH UNLIMITED DATA
Svetllana [295]

Answer:

Commercial HotSpots allows you mobility while regular wifi is a cheaper and reliable option while you are stale

Explanation:

8 0
3 years ago
Other questions:
  • What is basic function of an operating system?
    10·2 answers
  • How do I convert a number into a percentage in excel
    7·1 answer
  • What is the rationale behind the development of an operating system in computing?
    15·1 answer
  • Technological improvements have allowed people to inhabit a wider variety of places more easily. Please select the best answer f
    6·2 answers
  • How long is the latency time of a typical hard-disk drive spinning at 360 revolutions per second?
    6·1 answer
  • Which of the following represents the TCP/IP four-layer reference model? Group of answer choices Application, Internet, transpor
    11·1 answer
  • What does a proxy server do?
    5·2 answers
  • Examples of websites that use . com
    10·1 answer
  • Write a new version (called map2) of the map function which operates on two lists. Your function should accept three parameters,
    15·1 answer
  • What is the best wi-fi name you have ever seen?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!