Unable to set the Canvas Render Camera at runtime

Hi, I’m trying to learn how to mess with all the new Unity UI stuff. I’m fairly new so there is a great chance I’m just being an idiot.

However, I don’t seem to be able to set the main camera as the render camera for the canvas space after setting the rendermode to Screen Space Camera, below is a snippet of what I have… but I can’t seem to find anything in the reference material for the syntax…

theCanvasGO = new GameObject();
		theCanvasGO.name = "The Canvas";
		Canvas theCanvas = theCanvasGO.AddComponent<Canvas>();
		GraphicRaycaster theGraphicRaycaster = theCanvasGO.AddComponent<GraphicRaycaster>();
		RectTransform theCanvasRT = theCanvasGO.GetComponent<RectTransform>();
		theCanvas.renderMode = RenderMode.ScreenSpaceCamera;
		// here is where I'd like to assign the camera to the canvas...

Assign the camera to the worldCamera of the canvas.