How do I access a value in 1 C# script from another?

Hey all,

I know that this question has been asked a lot and there are lots of answers out there that don’t make a whole lot of sense to me. I have been looking into this on and off for a couple of days now. I am trying to simply access the value of a static variable in one script from another. I have tried lots of different solutions but nothing seems to work. I would like to check variable test in the TriggerZone script using a simple print command in the Testing script. The error I constantly get is “the name test does not exist in the current context” which to me means my Testing script can’t find the value from the TriggetZone script. I’m sure I’m just missing something easy but I’ll be damned if I can find it. THANKS!!

using UnityEngine;
using System.Collections;

public class TriggerZone : MonoBehaviour {
	
	// Use this for initialization
	
	bool doorIsOpen = false;
	public static int test = 0;
	
	void Start () {
	
	}
	
	void OnTriggerEnter(Collider col){
		
		if(col.gameObject.tag == "Player"){
			
			//print("Player is in trigger");
			
			if(doorIsOpen == false){
				doorIsOpen = true;
			
			animation.Play("open");
			test++;
		}
		
		
	}
			
}

using UnityEngine;
using System.Collections;

public class Testing : MonoBehaviour {
	
	// Use this for initialization
	void Start () {
	
	}
		
	// Update is called once per frame
	void Update () {
	
	}
	
	void whatever () {
	
		if(TriggerZone.test >= 0){
			print (test);
		
		}
	}
}

Static variables can be used like TriggerZone.test in other words className.variableName

if(TriggerZone.test >= 0){
print (TriggerZone.test);

         }