Thanks Sergey - yes, thanks: changing the line as follows resolves the problem:
rp.OpenConnection2("", "Sample Code from OSR", QBXMLRPConnectionType.localQBD);
However, this is not my code, it is Intuit's. So it is surprising to me such a change is required to get their code to run, which makes me wonder:
Is there not a way in C# to reference enums without adding such a prefix?