exam questions

Exam 70-483 All Questions

View all questions & answers for the 70-483 exam

Exam 70-483 topic 2 question 9 discussion

Actual exam question from Microsoft's 70-483
Question #: 9
Topic #: 2
[All 70-483 Questions]

You are developing an application.
You need to declare a delegate for a method that accepts an integer as a parameter, and then returns an integer.
Which type of delegate should you use?

  • A. Action<int>
  • B. Action<int, int>
  • C. Func<int, int>
  • D. Func<int>
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
supersunny
Highly Voted 5 years, 11 months ago
The delegate should be Func<int,int>. C.
upvoted 9 times
...
Egor
Most Recent 5 years, 1 month ago
But Why two ints?
upvoted 2 times
CNTPD1
5 years ago
One is parameter, other is a return value. https://docs.microsoft.com/en-us/dotnet/api/system.func-2?view=netcore-3.1 public delegate TResult Func<in T,out TResult>(T arg);
upvoted 7 times
noussa
4 years, 5 months ago
True. The output is missing "out " before the return type: Func<int, out int>( ....)
upvoted 2 times
...
...
...
memou
5 years, 1 month ago
Yup,action doesnt return anything afaik
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...