title: SSIS C# Script task - Can you set a Dts.Variable - Error: The type of the value being assigned to variable differs from the current variable type
body: <p>My variable is a string at the package level and have added it as readwritevariable
  example:</p>
  
  <pre><code>            public void Main()
  {
              string sServer = "localhost";
              Dts.Variables["User::sourceServer"].Value = sServer;
  }
  </code></pre>
  
  <p>will result in
  Error: The type of the value being assigned to variable  differs from the current variable type. Variables may not change type during execution. Variable types are strict, except for variables of type Object.</p>