How do I create a Camera and make it mainCamera with csharp script ?

How do I create a Camera object in csharp script. I also want to assign it as MainCamera with tags.
Currently I am getting this error :

UnassignedReferenceException: The variable levelCamera of ‘StartUp’ has not been assigned.
You probably need to assign the levelCamera variable of the StartUp script in the inspector.

These are the two lines of code which concern the camera :

	public Camera levelCamera;

…and

		levelCamera.enabled = true;

You have not assigned a Camera. You normally would drag one in via the Inspector, but to anwser your question, you would do something like (untested):

var cam = AddComponent(Camera);
cam.tag = "mainCamera";