单项选择题

He hurried to the booking office only ______ that all the tickets had been sold out.

A.to tell
B.to be told
C.telling
D.told