I got the question:

"What do you prefer, exception handling or if-condition?"

for an interview. My answer was that exception handlers are preferred only for exceptional circumstances like a disk permission error on file write. The interviewer seemed to be expecting some other answer. What is the correct answer?

EDIT: Any particular example where exception handling is commonly used when an if-condition would have been more appropriate?

c#
Edit
Report