单项选择题

For nearly two hours I waited to buy a ticket for the con cert, only ______ that all tickets had been sold out.

A.being told
B.I was told
C.to be told
D.was told