I saw this on Case Closed before. There was a nearby waterfall or a water pump somewhere. He fills the barn from a window in the top with a board to make a make-shift current, then quickly enters the barn somewhere and floats up to the rafters, then fastens the noose around his neck. The barn has crevices and holes in it, but the barn fills faster than it drains. After the barn has filled enough, he closes the window and waits for the barn to drain.