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]
2 years ago
7

Reference variables allow arguments to be passed by ____________.

Computers and Technology
1 answer:
son4ous [18]2 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
Greg works for online games development company. He occasionally visits online literature sites and downloads e-books of his cho
zalisa [80]

(A) Yes, because nobody is supposed to access non-work related sites during office hours.

3 0
3 years ago
Read 2 more answers
HELP ASAP, AND YES I KNOW, WRONG CATEGORY. SORRY!
Anastasy [175]

Answer:

A. ensemble.

Explanation:

A musical ensemble can be defined as a group of people who play instrumental and vocal music. It is also known as a music group and carries a distinct name. The word ensemble is derived from the Middle French ensemblée, meaning together at the same time.

A rock band will come under the category of a musical ensemble as it is also a group of people performing instrumental music or vocal music.

Therefore, option A is correct.

3 0
3 years ago
If a person is proactive, they do NOT have to be defensive.<br> True<br> False
Thepotemich [5.8K]
The answer is true for this question
6 0
2 years ago
Read 2 more answers
How has the development of personal computer hardware and software reversed some of the trends brought on by the industrial revo
Nadya [2.5K]
<span>There should be no need to have white-collar employers just next to factories thanks to the Information Revolution, and it enabled executives to stay in home, write documents, and send them easily.</span>
4 0
3 years ago
Is a program that hides in a computer or mobile device and allows someone from a remote location to take full control of the com
antoniya [11.8K]
Yes there are such programs/viruses.

5 0
3 years ago
Other questions:
  • Hi Im really a girl and i want to know how to change my username without having to make a new account?
    9·2 answers
  • What is one way to maintain Internet safety? a) avoid interacting with people on the Internet. B) avoid giving out information a
    7·1 answer
  • Your boss asks you to work through the weekend to install new software on the applications server that serves up applications to
    15·2 answers
  • Assume that x is a string variable has been given a value. Write an expression whose value is true if and only if x is an hexade
    9·1 answer
  • A(n) ____ is a front-end processor that multiplexes the traffic from hundreds of remote terminals into one port on a large compu
    10·1 answer
  • Which of the following code segments does not contain any errors?
    7·1 answer
  • Create a do-while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The loop shou
    5·1 answer
  • I will upvote....
    10·1 answer
  • To generate a series of first ten counting number of algorithm​
    9·1 answer
  • Anyone know why my desktop won’t turn on, I upgraded my ram and my monitor won’t turn on
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!