How to Change the size of BoxCollider2D C#?

Hi everyone Im not much of a coder but I have a question about changing the size of the Boxcollider 2D. I want the Boxcollider2D to change once I press a button to conform to the new sprite. Im coding in C# so that code would be helpful. So what can or do I do thanks. This is the code that I wan the change to occur.

if (Input.GetKeyDown (KeyCode.A) && isGrounded) {
					if (FlashlightController.BATTERIES > 1){
						transform.localScale = new Vector3 (1, 1, 1);
						anim.SetInteger ("AnimationState", 3);
						FlashlightController.BATTERIES -= 1;


public GameObject otherGameObject;

 private BoxCollider2D boxCol;
    void Awake ()
        boxCol = otherGameObject.GetComponent<BoxCollider2D>();
if (Input.GetKeyDown(KeyCode.A)){
 boxCol.size = new Vector3(3,3,3);

check this page for more information HERE