EX-23 8 d311317dex23.htm EX-23 EX-23

Exhibit 23

CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM

We consent to the incorporation by reference in the previously filed Registration Statement (No. 333-5432) on Form S-8 and (No. 333-96579) on Form S-3D of Middlefield Banc Corp. of our report dated March 20, 2012, relating to our audits of the consolidated financial statements included in and incorporated by reference in the Annual Report on Form 10-K of Middlefield Banc Corp. for the year ended December 31, 2011.

/s/ S.R. Snodgrass, A.C.

Wexford, PA

March 20, 2012