Sending script variable (from multiple gameobjects) to another script by calling another script's void?

I’m trying to send gameobject’s own script to another script by calling another’s script. I know how it should work but I just know how to work with script’s Class. Like with gameObjects it’s like

anotherScript.exampleVoid(myGameObject);
//to
public void exampleVoid (GameObject newGameObject)   
//////or with int
anotherScript.exampleVoid(myInt);
//to
public void exampleVoid (Int newInt) 

But with script variables the class name always changes. So can I also send the class name with my variable somehow? Hope you guys understand what I mean by this.

I think I understand what you want; You have two script classes:

public class ScriptA : MonoBehaviour
{
	// class stuff
}

public class ScriptB : MonoBehaviour
{
	// other class's stuff (in a different file)
}

You also want one of these classes to have a function whose parameter has the type of the other class:

public class ScriptA : MonoBehaviour
{
	public void someFunction(ScriptB otherScript)
	{
		// function stuff
	}
}

Finally, you want a script of the other class to be able to call this function, passing itself into that parameter. To do that, you use the this keyword:

public class ScriptB : MonoBehaviour
{
	public ScriptA referenceToOtherScript;

	void Start()
	{
		referenceToOtherScript.someFunction(this);
	}
}

If you need more help with the fundamentals of C#, there’s a series of official unity tutorials on the subject here.