
43 Cal.App.2d 492 (1941)
CLYDE E. CATE, as Trustee in Bankruptcy, etc., Respondent,
v.
JAMES A. STAPLETON, Appellant.
Civ. No. 2573. 
California Court of Appeals. Fourth Appellate District.  
March 17, 1941.
 Frank H. Marvin and Cooley, Crowley & Supple for Appellant.
 Henry O. Wackerbarth for Respondent.
 BARNARD, P. J.
 This is an appeal from an order denying a motion for a change of venue from the county of Fresno to the city and county of San Francisco, which is the residence of the appellant.
 The action is one brought by a trustee in bankruptcy for the purpose of recovering certain money and property alleged to have been turned over to the defendants in payment of a debt, on the ground that the same constituted a preference within the meaning of the Bankruptcy Act. The bankrupt corporation had its principal place of business in Fresno County and the trustee in bankruptcy was appointed by a referee of the United States District Court at Fresno. It is conceded that neither defendant resides in Fresno County and the question presented is whether or not an action to set aside a preference, as authorized by the Bankruptcy Act, is predicated upon a contractual obligation.
 Section 46 of the Bankruptcy Act (U.S.C.A., Tit. 11) provides that suits by a trustee shall only be brought or prosecuted in courts where the bankrupt could have done so had bankruptcy proceedings not been instituted "except as provided in sections 96 ... of this title". Section 96 of this act provides what shall constitute a preference and, in subdivision b thereof, provides that any such preference may be avoided by the trustee if the creditor receiving it has reasonable cause to believe that the debtor was insolvent at the time and that, for such purpose, "any State court which would have had jurisdiction if bankruptcy had not intervened ... shall have concurrent jurisdiction."
 [1] Such actions have been frequently filed in the superior courts of this state and it cannot now be questioned that these *494 courts have jurisdiction in such actions. This being true, the venue or particular court where such an action is to be tried depends upon the laws and rules of this state. Under section 395 of the Code of Civil Procedure, the county in which one of the defendants resides is the proper county for the trial of this action unless it is one where "a defendant has contracted to perform an obligation in a particular county", in which case it may be tried in that county, subject to exceptions which are not material here.
 The respondent argues that statutory obligations or liabilities are contractual, relying on such cases as Winchester v. Howard, 136 Cal. 432 [64 P. 692, 69 P. 77, 89 Am.St.Rep. 153], Dean v. Shingle, 198 Cal. 652 [246 P. 1049, 46 Am.St.Rep. 1156], Thomas v. Wentworth Hotel Co., 158 Cal. 275 [110 P. 942, 139 Am.St.Rep. 120], Kennedy v. California Sav. Bank, 97 Cal. 93 [31 P. 846, 33 Am.St.Rep. 163], Marshall v. Wentz, 28 Cal.App. 540 [153 P. 244], Bliss v. Sneath, 103 Cal. 43 [36 P. 1029], County of San Luis Obispo v. Gage, 139 Cal. 398 [73 P. 174], Chapman v. Jocelyn, 182 Cal. 294 [187 P. 962], and Hollywood, etc., v. Keyes, 12 Cal.App. 172 [107 P. 129], in which cases it has been held, in general effect, that parties will be deemed to have incorporated into their agreements the statutes which affect the matters concerning which they have contracted. It is then argued that during the period of its insolvency this bankrupt corporation and its officers held its assets in trust for the benefit of its creditors and its stockholders, that if the defendants received any of these assets during that time there was an implied promise on their part to repay and return such trust property, and that this action is based upon that obligation which the defendants impliedly agreed to perform in Fresno County.
 Not all statutory obligations or liabilities are contractual, although in many cases, notably those involving the rights and liabilities of stockholders and officers of corporations, a party is deemed to contract in view of existing statutes, even to the extent that these become a part of his contract. Moreover, a contract has often been implied in order to provide a remedy where one would otherwise not exist. In the instant case a remedy is expressly provided by statute and it is not necessary to rely upon any theory of implied contract. Obviously, there is a difference between accepting the provisions of *495 a statute as a part of a contract which is being entered into and the doing of something which a statute expressly forbids. [2] It is well settled that actions based on obligations created by statute may or may not be contractual in nature.
 In 6 California Jurisprudence, page 24, it is said:
 "It may be conceded that there are obligations arising by operation of law which do not also come within the class of obligations arising from contract; but it must also be admitted that there are obligations which, in a certain sense, arise from the operation of law, and at the same time are in substance and effect contracts--that there are liabilities which although arising from statute may nevertheless be contracts. Contracts may be made or evidenced by a statute, and by conduct ensuing thereupon, as well as by other means or evidence. The statute itself, coupled with the subsequent performance of the conditions, furnishes all the elements which are necessary to the formation and existence of an implied contract. There is a clear distinction between such a case and one in which an implied contract is raised by the law out of pure necessity and merely to provide a remedy."
 In Walker v. McCusker, 65 Cal. 360 [4 P. 206], an action based upon a statutory liability, the court said:
 "The liability of the tenant in possession to the purchaser, for rents or use and occupation from the day of sale to the expiration of the time for redemption, is a statutory liability merely, and exists without the assent of the person in possession. It is not a liability founded on a contract express or implied, within the meaning of section 537 of the Code of Civil Procedure, authorizing the issuance of an attachment."
 In Talcott Land Co. v. Hershiser, 184 Cal. 748 [195 P. 653], in passing upon a statutory obligation imposed upon the directors of the corporation, the court said:
 "Appellant's contention is that this is not an action upon a contract, express or implied, for the direct payment of money within the meaning of section 537 of the Code of Civil Procedure, authorizing attachments in such cases only. The argument that the liability is contractual is predicated upon the proposition that the director upon assuming office enters into a contract to perform the duties of his office in a lawful manner, and that his failure so to do is a breach of this implied contract, and for such breach an attachment will lie *496 upon the implied obligation to restore to the corporation the full amount of the capital so diverted. We think it is clear that the obligation is wholly statutory if not penal, as we have heretofore pointed out, and is in no sense contractual within the meaning of the attachment law."
 In Mudge v. Steinhart, 78 Cal. 34 [20 P. 147, 12 Am.St.Rep. 17], the court said:
 "'The existence of a contract, express or implied, is an essential basis without which no writ of attachment can properly issue, and as in this case the action was founded, not upon contract, but upon the fraud and wrongful acts of the defendant, we are of opinion the writ of attachment issued therein was absolutely void ...'"
 [3] The provisions of the Bankruptcy Act here in question are in fact not based upon any contractual obligation, but upon the theory that a wrongful act has been committed which interferes with the rights of other creditors. It has been held that it is not necessary to show that there was any agreement or arrangement between the parties to the preference. (Gabriel v. Tonner, 138 Cal. 63 [70 P. 1021].) In practical effect the action sounds more in tort than in contract, being based upon the wrongful act of the parties, resulting in harm to others, when they had knowledge of the conditions at the time they acted. The duty to return the property arises from the express provisions of the statute irrespective of any contract, express or implied. Insofar as any contractual relationship is concerned, rather than being based upon the performance of an obligation, the action is more in the nature of one to set aside a contract as expressly forbidden by the statute under the existing circumstances. For these reasons we hold that the obligation of these defendants, if any, to return the proceeds of the preference obtained by them, was not one which they had contracted to perform in Fresno County, within the meaning of section 395 of the Code of Civil Procedure.
 The order is reversed.
 Marks, J., and Griffin, J., concurred.
