Any domestic or foreign railroad corporation may lease, purchase, or in any other way become the owner of, or may control or hold the stock of any other railroad company, when their respective roads can be lawfully connected and operated together, so as to constitute one continuous line, with or without branches. When such lease or purchase shall be made by a foreign corporation it shall not be effectual for any purpose until such corporation shall have first complied with all the laws of this state pertaining to such corporation, when it shall have the same rights, powers, privileges, and be subject to the same duties, obligations, and liabilities in respect to the railroad so leased or purchased, as pertained to such road. The corporation so leasing or purchasing shall be subject to any law of this state now in force or hereafter enacted relating to the taxation of the properties so leased or purchased. No railroad corporation shall consolidate with, lease, or purchase, or in any way become the owner or have the control of any other railroad corporation, or any of the stock or franchises thereof, which owns or controls a railroad parallel to and competing with the railroad owned or controlled by such leasing or purchasing corporation; nor shall any railroad corporation purchase or in any way become the owner of any property owned and operated by any other railroad corporation as a part of a railroad which is parallel and competing to and with the railroad of such purchasing company; and the question whether any of such railroads are parallel or competing lines shall, at the election of the party complaining, be decided by a jury as in civil cases. Any railroad corporation which shall consolidate with, lease, or purchase, or in any other way become the owner or acquire the control of any other railroad corporation, or any of the stock or franchises thereof, which owns or controls a railroad parallel and competing with the railroad owned or controlled by such leasing or purchasing railroad corporation, shall be guilty of a misdemeanor; and, upon conviction thereof, punished by a fine of not less than $3,000, nor more than $35,000; and any officer of the leasing or purchasing company who shall aid, abet, or participate in any violation of this section shall be guilty of a misdemeanor.