title: Script Task : write 2 classes and access Global variable
body: <p>Can i write 2 classes for one Script Task editor in SSIS(2008). I tried to access the global variable like below. I created 2 classes and it doesn't show any compile error, but i couldn't access the global variable in class2 which was assigned as 2 in class, ScriptMain. Please suggest.</p>
  
  <pre><code>Imports System
  Imports System.Data
  
  Class ScriptMain
  
     Dts.Variables("var").Value = 2
  
  End Class
  
  Class class2
  
     Dim var2 As String
  
     var2 = Dts.Variables("var").Value
  
  End Class
  </code></pre>