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
Universal Containers (UC) has decided to build a new, highly sensitive application on the Force platform. The security team at U
Tresset [83]

Use an AppExchange product that does fingerprint scanning with native Salesforce Identity  Confirmation

8 0
3 years ago
PLEASE SOMEONE ANSWER THIS
maw [93]
Maybe 7411 or someones birthday in the family
3 0
2 years ago
Read 2 more answers
Helppppp
ASHA 777 [7]

Answer:

=IF(E4<=F4, “Reorder”,”No”)

Explanation:

7 0
3 years ago
Write a recursive Scheme function merge(firstNameList, lastNamelist) that receives a simple list of first names and a simple lis
miv72 [106K]

Answer:

Write a recursive Scheme function power(A, B) that takes two integer parameters, A and B, and returns A raised to the B power. A must be a positive value, but B maybe a negative value.

Explanation:

7 0
3 years ago
The device that concerts one type of signal to another is what​
chubhunter [2.5K]

Answer:

Transducer is a type of device that converts one type of signal into another.

6 0
3 years ago
Other questions:
  • Which scenario depicts an ethical workplace practice by a business owner
    15·2 answers
  • Write the definition of a class Clock. The class has no constructors and three instance variables. One is of type int called hou
    13·1 answer
  • Pseudocode is an improvement over the IPO chart because it lays out the a0 sequence of steps for a particular program.
    6·1 answer
  • How do you change your age on Brainly?
    10·1 answer
  • 120
    14·1 answer
  • Why don’t the ads on Brainly load anymore
    14·2 answers
  • How was kapilvastu named​
    11·1 answer
  • Assume the size of an integer array is stored in $s0 and the address of the first element of the array in the memory is stored i
    10·1 answer
  • Here’s my last question
    12·2 answers
  • Which two features could be added to a game using an "if () then " block
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!