Link classes

how do you go about linking classes together, i need to access a variable from lets stay “FirstClass” from “SecondClass”

any help is greatly appreciated!