# Import file

Import File

The Import function is used to load a script file, which can be used in the terminal or in the script file.

void Import(string filename,params object[] args)

You can also pass any number of parameters to the loaded script file and use these parameters in the script file.

In the script file, use {~} to get these parameters, {~0} for the first parameter, {~1} for the second parameter, etc...

For example you can create a file named "ParameterTest.cs" and enter the following scripts.

//This script demonstrates how to use parameters in a file. //You can use this file through Import("ParameterTest.cs", 1,2) or Import("ParameterTest.cs", "AB","CD") //or through command line FTPRush.exe ParameterTest.cs AB CD var var1 = {~0}; var var2 = {~1}; Println(var1 + var2);

Import this script file in the terminal window like below. You can pass integer parameters or string parameters.

The Import function can be used in script file. For example you can define a class Test in the ClassTest.cs file and import it in another script file like below:

//This script demonstrates how to use the class defined in another file. Import("ClassTest.cs"); Test test_object = new Test(); test_object.Output("This is test message");