i got the answer accordingh to this link : set filepath from database in SSIS variable for logging
IDTSVariables100 varCollection = null;
this.VariableDispenser.LockForRead("User::FilePath");
string XlsFile;
XlsFile = varCollection["User::FilePath"].Value.ToString();
all i need is :
this.VariableDispenser.LockForRead("User::FilePath");