See the following post: http://stsadm.blogspot.com/2007/10/set-search-center.html.
This is basically what you do:
string url = "your site collection url";
using (SPSite site = new SPSite(url))
using (SPWeb web = site.RootWeb)
{
string searchCenter = "your search center url";
web.AllProperties["SRCH_ENH_FTR_URL"] = searchCenter;
web.Update();
}
Sometime I've found that the SDK documentation is less than helpful and tend to resort to disassembling the web pages that you'd hit when doing this via the browser.