Difficulty: Easy
Correct Answer: True
Explanation:
Introduction / Context:
This statement distinguishes between a function (which returns a value) and a subroutine (a void method in C#) that does not return a value using the return keyword.
Given Data / Assumptions:
Concept / Approach:
In C#, a method with a non-void return type must return a value compatible with its signature. A void method cannot use return with a value. Nonetheless, a void method may still communicate results via ref/out parameters, which does not contradict the statement about the return keyword.
Step-by-Step Solution:
Verification / Alternative check:
Check compiler rules: returning a value from a void method is illegal.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing ref/out outputs with the return value itself.
Final Answer:
True
Discussion & Comments