Switching Between Cameras

Hey guys,
I’m still struggling with trying to switch between two cameras.
I found a few examples on here but havent been able to quite figure it out yet.

whats the easiest way to do this?
if i have say:

Camera1
Camera2

Im trying to use this example right now:

Camera Example

I made a script with just that code in it.
he says to just call it with “SelectCamera(1);”
I just cant figure out the syntax. so if i want to call camera2 from a diffrent script what would it be?

thanks

This is what I use in C# Unity 5

using UnityEngine;
using System.Collections;

public class CameraSwitcher : MonoBehaviour {

	[SerializeField] private GameObject[] cameras = new GameObject[5];

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {

		if (Input.GetKeyDown("1") && cameras[0] != null) 
		{
			switchCameras(0);
		} 
		else if (Input.GetKeyDown("2") && cameras[1] != null) 
		{
			switchCameras(1);
		}
		else if (Input.GetKeyDown("3") && cameras[2] != null) 
		{
			switchCameras(2);
		}
		else if (Input.GetKeyDown("4") && cameras[3] != null) 
		{
			switchCameras(3);
		}
		else if (Input.GetKeyDown("5") && cameras[4] != null) 
		{
			switchCameras(4);
		}
	}

	private void switchCameras(int keyNum) {
		for (int i = 0; i < cameras.Length-1; i++) {
			if (cameras *!= null && keyNum != i) {*
  •  		// turn camera off*
    

_ cameras*.GetComponent().enabled = false;_
_
} else {_
_
// turn camera on*_
_ cameras*.GetComponent().enabled = true;
}
}
}
}*_

Try this:
If you want to look at Camera2:

Camera1.enabled = false;
Camera2.enabled = true;

for Camera1 same code but change false/true.

I got an answer to this problem last week, using UI buttons, works perfectly. Maybe it will help.