2D Camera Drag Boundaries

Hi all, below is my camera script for moving the camera on mouseDown, how would I incorporate the clamp function to get the camera to stay within specified boundaries? thanks!

 if(Input.GetMouseButton(0))
    	{
    		var dx = Input.GetAxis("Mouse X");
    		var dy = Input.GetAxis("Mouse Y");
    		var dV : Vector3 = new Vector3(-dx * 0.15, -dy * 0.15,0);
    		
    		Camera.main.transform.position += dV;
    	}

Insert on line 6 (replacing line 7):

   var newPos = Camera.main.transform.position + dV;
   newPos.x = Mathf.Clamp(newPos.x, minX, maxX);
   newPos.y = Mathf.Clamp(newPos.y, minY, maxY);
   Camera.main.transform.position = newPos;

You will need to define and initialize minX, minY, maxX, maxY.