Events and Delegates

Events and Delegates

University

16 Qs

quiz-placeholder

Similar activities

Google Docs

Google Docs

5th Grade - University

13 Qs

Basic Excel

Basic Excel

University

15 Qs

OOP

OOP

University

10 Qs

Microsoft  Office Word

Microsoft Office Word

4th Grade - University

12 Qs

Scratch

Scratch

KG - Professional Development

10 Qs

Java Programming-1

Java Programming-1

University

10 Qs

Java History Characteristics Environment

Java History Characteristics Environment

University

12 Qs

Kuis OOAD Pertemuan 4

Kuis OOAD Pertemuan 4

University

10 Qs

Events and Delegates

Events and Delegates

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

Lock Huynh

Used 7+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

16 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which of the following statements are TRUE?

Delegate is a reference type

Delegate is a value type

Delegate does not define the method signature

Delegate is pointer type

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

How to define a delegate which points to the following methods

public delegate void ToString(int value);

public string delegate ToString(int value);

public delegate string ToString(int value);

public string ToString(int value)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How to pass a function as a parameter in C#?

Cannot pass a function as a parameter in C#

Using pointer

Using dynamic parameter type

Using delegate

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following program ?

Number: 100000.00

Money: Rs. 1,00,000.00

Number: 1,00,000
Money: $1,00,000.00

Compile-time error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statement is TRUE?

An event is an encapsulated delegate

An event is a callback method

A event is a static method

None of the above

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How would you declare an event for the following delegate?
public delegate void ClickHandler();

public ClickHandler OnClick;

public event ClickHandler OnClick;

public event void OnClick;

public ClickHandler event OnClick;

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the built -in delegate function for handling events in .NET?

public delegate void Action();

public delegate void Predicate(object sender);

public delegate void EventHandler(object sender, EventArgs e);

None of the above

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?