Programming Languages
C#
Subjective
Mar 14, 2013
What value is returned by a lone `return;' statement?
Detailed Explanation
The undefined value in scalar context, and the empty list value () in list context.
This way functions that wish to return failure can just use a simple return without worrying about the context in which they were called.
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts