Add camera prefab to script in c#

I would like to add a camera prefab to my script, I tried this, am I close?

public Transform PlanetCamPrefab = Instantiate(Resources.Load("PlanetCam"));

If I leave it empty, I have to manually add the prefab, how would you let c# do it automatically.

You can try one of these options:

public GameObject PlanetCamPrefab = Resources.Load("PlanetCam") as GameObject;

Then you can use PlanetCamPrefab.transform to fetch the transform, or any other component.
If you want to implicitly make it a transform from the start, use this:

public Transform PlanetCamPrefab = Resources.Load("PlanetCam", typeof(Transform)) as Transform;

Last, if you want to reference the Camera component, then you need the variable to be of type Camera as well:

public Camera PlanetCamPrefab = Resources.Load("PlanetCam", typeof(Camera)) as Camera;

You cant use GameObject.Instantiate or Resources.Load in field initialization. Your best options is Awake, awake works the same as constructor (or field initialization), but it only runs when unity is ready to receive calls.

The usual method is:

void Awake() {
   if (cam == null) cam = Resources.Load("Cam", Camera);

If you really need it, I think that the unique option is to create and EditorScript and resolve the reference before you run the app.