how to: make global variable

hi, i am newbie in unity. before i use vb.net.
in vb.net we can create a module just for containing our global variables that can be used in all forms.
can i achieve that feature in unity?

the real problem is :
i have import some sprites in “assests/resources”. i have used them in making sprite in the scene. but i need the “sprite” game object to return some value from comparing its sprite with the sprites in “assets/resources”. anyone can help?

make a script for example SpriteMgr :

inside put a getter like that :

  public Sprite[] instance{get;private set;}

then from another class just get an instance of that script like that :
private SpriteMgr spriteReference = new SpriteMgr();

private void Awake(){
if( blabla == spriteReference.instance.something){
do something... }
}

I don’t know what specific variable you are dealing with but I will use an integer as an example called number.

using .....


Class xxxx : Monobehavior
{
   public static int number = 0;

   Awake()
   {}
}