Exhibit 23
CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM
We hereby consent to the incorporation by reference in the Registration Statement on Form S-3 (No.
333-128783) of Gladstone Commercial Corporation of our report dated
February 28, 2006 relating to
the financial statements, financial statement schedules, managements assessment of the
effectiveness of internal control over financial reporting and the effectiveness of internal
control over financial reporting, which appears in this Form 10-K.
PricewaterhouseCoopers LLP
McLean, VA
February 28, 2006