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
stepan [7]
3 years ago
7

Create a Delegate to Compare two Integers.

Computers and Technology
1 answer:
Yanka [14]3 years ago
6 0

Answer:

Delegate is a function pointer which points the address of a function.

Explanation:

Let the function to compare two integers takes two integers as arguments

C#.net syntax:

delegate void  Del(int,int);

Here delegate is the keyword. Del is the name of the delegate which stores the address of the function whose return type is void and which takes 2 integer arguments.

public void CompareIntegers(int x, int y)

{

if (x>y) Console.WriteLine("X is greater");

else Console.WriteLine("Y is greater");

}

delegate void  Del(int,int);

void main(){

Del del1=new Del(CompareIntegers);

}

You might be interested in
How is an amp meter connected in a circuit to measure flow of electrons
Leno4ka [110]
R=0 of the amp meter so it can be placed in the circuit
7 0
3 years ago
Read 2 more answers
When operating your vessel with a vhf radio, what channel must you monitor?.
Vladimir [108]

Answer: <u>Channel 16</u>. If you hear a MAYDAY call, remain silent, listen, and write down information about the boat in distress.

Hope this helps!

4 0
2 years ago
Which of these practices should you follow while creating your resume?
avanturin [10]

B is better than any other one's I think.

8 0
3 years ago
Read 2 more answers
true or false : The incorrect attitude towards driving is the cause of most collisions among teenage drivers.
natulia [17]
That is true your state of mind is what matters most 

4 0
3 years ago
Read 2 more answers
Write a C class, Flower, that has three member variables of type string, int, and float, which respectively represent the name o
Ulleksa [173]

Answer and Explanation:

C is a low level language and does not have classes. The language isn't based on object oriented programming(OOP) but is actually a foundation for higher level languages that adopt OOP like c++. Using c++ programming language we can implement the class, flower, with its three variables/properties and functions/methods since it is an object oriented programming language.

3 0
3 years ago
Other questions:
  • When you schedule an appointment, Outlook adds the appointment to the ____ folder by default.
    9·1 answer
  • Which of these definitions BEST explains what plagiarism is:
    14·2 answers
  • Within the hardware of the personal computer temporary memory is known as
    10·2 answers
  • Kai is a software engineer who started his own IT consulting firm. His friend, Catalina, is the owner of a store that sells offi
    13·2 answers
  • Write a Temperature class that will hold a temperature in Fahrenheit, and will provide methods to get and display the temperatur
    5·1 answer
  • I’ll mark brainliest if correct
    10·1 answer
  • Define input hardware​
    12·1 answer
  • Pls help now the question is very hard someone help me pls​
    6·1 answer
  • Louis is a civil engineer and wants to use a line on a floor plan that is indicative of the position from which a section is tak
    5·2 answers
  • Use the {blank} to view your presentation the way an audience will see it.
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!