
65 Wn.2d 456 (1965)
397 P.2d 1019
CLYDE AUSTIN, Respondent,
v.
C.V. WILDER & CO., INC., Appellant.[*]
No. 37010.
The Supreme Court of Washington, Department Two.
January 7, 1965.
Livesey, Kingsbury & Livesey, by George Livesey, Jr., for appellant.
David E. Rhea, for respondent.
WEAVER, J.
May 28, 1959, defendant (appellant) Wilder & Co. contracted to construct a sanitary sewer project for the City of Bellingham.
The contract provided:
"The said Contractor [Wilder & Co.] agrees to pay the wages of all persons and for assistance of every kind employed *457 upon or about said work, and for all materials purchased therefor, and the City of Bellingham may withhold any and all payments under the contract until satisfied that such wages, assistance and materials have been fully paid for."
The contract also provided that:
"... The Contractor [Wilder & Co.] shall not assign or transfer the contract for this improvement or sub-let any of the work embraced in it without the written consent of the Board of Public Works." (Italics ours.)
June 15, 1959, Wilder & Co. entered into a subcontract with Glen Eyerly to do certain drilling and blasting for the sewer project. This subcontract was made without the written consent of the Board of Public Works of the city as required by the terms of the prime contract quoted supra.
Eyerly ordered blasting and other supplies from plaintiff Austin. The materials were delivered, invoiced, and billed to Eyerly. Plaintiff Austin knew that Eyerly was a subcontractor of Wilder & Co. Subsequently, Eyerly became bankrupt without having paid the amount he owed plaintiff.
Plaintiff Austin (the materialman) commenced this action against defendant Wilder & Co. (the prime contractor) for materials delivered to Eyerly (the subcontractor). This action does not involve the prime contractor's performance bond, the City of Bellingham, or any percentage of the contract payment that might have been retained by the city. Defendant appeals from a money judgment against it.
This appeal brings into sharp focus the application of RCW 39.08.065 to the facts. RCW 39.08.065, omitting provisions not material here, provides:
"Every person [Plaintiff Austin] ... furnishing materials ... to be used in the construction ... of any work for the ... city [of Bellingham] ... shall, not later than ten days after the date of the first delivery of such materials ... to any subcontractor [Eyerly] or agent ... having a subcontract [Eyerly] for the construction ... deliver or mail to the contractor [Defendant Wilder & Co.] a notice in writing stating in substance and effect that such person [Plaintiff Austin] ... has commenced to deliver materials ... and that such *458 contractor [Defendant Wilder & Co.] and his bond will be held for the payment of the same, and no suit or action shall be maintained in any court against the contractor [Defendant Wilder & Co.] or his bond ... unless the provisions of this section have been complied with." (Italics ours.)
It is admitted that plaintiff did not give written notice to defendant as required by the statute.
This statute has been before the court on a number of occasions. It would not be accurate to say that we find the decisions completely consistent in all facets of the statute's application to the varying factual situations discussed therein.
[1] In our analysis of the cases we start with the proposition that the legislature, by enacting RCW 39.08.065, has given us a guideline by which to determine when a materialman may recover from a prime contractor for materials delivered to a subcontractor. The purpose of the written notice is to enable the prime contractor to protect himself against the obligations of the subcontractor, so that he may not be compelled to pay twice for the same materials. Cascade Lbr. & Shingle Co. v. Wright, 99 Wash. 421, 426, 169 Pac. 833 (1918). Absent the 10-day statutory written notice the prime contractor is protected against a suit by a materialman of a subcontractor unless the prime contractor has waived his rights under the statute, or, by his action, misled the materialman.
In Ledingham v. Blaine, 105 Wash. 253, 177 Pac. 783 (1919), the materialman of a subcontractor was denied recovery against the prime contractor and his bondsman; he had failed to give the statutory notice. Cf. Denham v. Pioneer Sand & Gravel Co., 104 Wash. 357, 176 Pac. 333 (1918).
Niemi v. Brewster, 154 Wash. 181, 281 Pac. 488 (1929) and Maryland Cas. Co. v. Tacoma, 199 Wash. 384, 92 P. (2d) 203 (1939), illustrate the correct application of RCW 39.08.065 to the facts of the instant case. In both cases the materialman of a subcontractor was denied recovery against the prime contractor because the statutory 10-day notice was not given.
*459 [2] Apparent inconsistencies, to which we have alluded, spring from language, quoted out of context or unnecessary to the decision, discussing the question of whether the prime contractor has waived the 10-day notice provision of the statute under the varying factual pattern of each particular case. Generally, there are two fact patterns to which the statute is not applicable. The first is the situation in which the subcontractor is made the agent of the contractor by the prime contract. The cases refer to this as a waiver. Both Niemi, supra, and Maryland Cas., supra, recognize that the notice required by the statute may be waived. In Niemi the court said:
"... the burden was upon Niemi [the materialman] to show facts constituting such waiver by Brewster [the prime contractor]."
Hence, deliveries made by a materialman to the agent would be deliveries to the prime contractor for which he would be liable, and the statute under discussion would not apply. Rachow v. Philbrick & Nicholson, 148 Wash. 214, 268 Pac. 876 (1928); Maeder Steel Products Co. v. Brewster, 154 Wash. 120, 281 Pac. 14 (1929); and Union Oil Co. of California v. Turner, 34 Wn. (2d) 25, 207 P. (2d) 733 (1949), are illustrative. In each, the prime contract provided in substance:
"`All subcontractors shall be considered the agent of the contractor and the latter shall be responsible for all work and material furnished and any indebtedness incurred by such agent.'" (Italics ours.)
Thus the prime contractor waived the requirement of the 10-day statutory notice.
Insofar as these three cases discuss the failure of the prime contractor to get approval of the subcontract or to file it, they are inapposite to the instant case. Plaintiff Austin knew that Glen Eyerly was a subcontractor of defendant Wilder & Co. and did business with him as an individual. It would be a non sequitur to say that defendant's failure to have the subcontract approved would affect this relationship. Further, there is nothing in the contract before us requiring it or any subcontract to be filed.
*460 The second situation to which the statute is not applicable is that of the materialman who has no knowledge he is dealing with a subcontractor rather than with the prime contractor.
Plaintiff Austin relies upon Crane Co. v. Maryland Cas. Co., 102 Wash. 59, 172 Pac. 866 (1918), and Cascade Constr. Co. v. Snohomish Cy., 105 Wash. 484, 178 Pac. 470 (1919). These cases can be read to stand for the conclusion that the failure of the prime contractor to have his subcontract approved and filed so that a materialman has notice results in liability of the prime contractor. We find these cases distinguishable from the case before us for several reasons.
Crane is an action against the bondsman of the prime contractor; statutory notice is not discussed. In both Crane and Cascade the prime contractor attempted to assign the entire contract, although the prime contract prohibited assignment without consent. In Crane the court said:
"... it seems quite apparent to us that there was no intention on the part of Beers Building Company [prime contractor] and Musgrave and Blake [subcontractor] that there should be any assignment or subcontract in this sense...." (Italics ours.)
In Cascade this court explained the language of Crane by saying:
"... what was meant there was that, so far as the original contractor and the surety upon that contract were concerned, Musgrave and Blake were agents of the original contractor for the purpose of purchasing supplies used in the building. There was no question of notice in that case [Crane], and the use of the word `subcontractors' was to denote agency, as the whole context indicates...." (Italics ours.)
If a reasonably prudent materialman does not know that he is doing business with a subcontractor, but believes he is dealing with a prime contractor, then the rationale of Crane and Cascade might govern for the materialman has been misled; but such are not the facts of the instant case and RCW 39.08.065 is controlling.
Finally, Plaintiff Austin urges that we recognize a third situation to which the statute is not applicable. He claims *461 that he is a third party beneficiary of the contract between defendant and the City of Bellingham. Were it not for the statute, there might be merit to plaintiff's argument, but to adopt it would, for practical purposes, write the statute from the books.
The judgment is reversed.
OTT, C.J., HILL and HAMILTON, JJ., and EDGERTON, J. Pro Tem., concur.
February 25, 1965. Petition for rehearing denied.
NOTES
[*]  Reported in 397 P. (2d) 1019.
