Events and Delegates

Events and Delegates

University

16 Qs

quiz-placeholder

Similar activities

Microsoft  Office Word

Microsoft Office Word

4th Grade - University

12 Qs

Hardest Test Ever MADE YOU WILL FAIL

Hardest Test Ever MADE YOU WILL FAIL

KG - University

8 Qs

Sikhism

Sikhism

KG - University

10 Qs

ASP. NET QUIZ_1

ASP. NET QUIZ_1

University

10 Qs

slides quiz

slides quiz

9th Grade - Professional Development

10 Qs

Visual Basic Intro

Visual Basic Intro

University

10 Qs

Quiz Cyber Kel 6 Pr 6F

Quiz Cyber Kel 6 Pr 6F

University

10 Qs

NP Lab exam (12/11/20)

NP Lab exam (12/11/20)

University

10 Qs

Events and Delegates

Events and Delegates

Assessment

Quiz

Computers

University

Medium

Created by

Lock Huynh

Used 7+ times

FREE Resource

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?