Mark Broadbent has a few nuggets of information regarding using variables in SSIS script components:
Notice that in the example above the assumption is that the SSIS variable datatype is compatible with the script variable type.
Once you have finished writing your code block you may save your code and close the Script Editor. All that is left is to click the OK button to close the Script Task Editor and run your package!
Getting variables to work in script components isn’t terribly difficult, but Mark shows that there are quite a few steps to the process.