To facilitate this object the statute provides that, if a corporation is a party to a suit, the opposite party may examine the president, treasurer, clerk, or any director or other officer thereof, in the same manner as if he were a party to the suit.