1. Home
  2. Computer Science MCQs
  3. C#
  4. Which keyword defines a method in C#?

Added 16 Sep 2025

Which keyword defines a method in C#?

  1. method
  2. function
  3. def
  4. None needed Correct answer

Correct answer

D. None needed

15 views

MCQSEXAM

Explanation

Methods in C# are defined without any special keyword, just the return type and method name.

Reference

Asked in: Programming Exams

https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/meth…

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More C# MCQs

Practise all C# MCQs

Similar MCQs