title: Cannot convert the "System.Object[]" value of type "System.Object[]" to type "System.Char"
body: <p>I am just getting started with powershell and I'm making a very simple encryption function. I want to take each char in a string, convert it to a int and add a chosen number then convert it back to a char.</p>
  
  <p>This works fine:</p>
  
  <pre><code>function encrypt($a){
    $letter=[int][char]$a
    $letter=$letter+1;
    return [char]$letter
  }
  encrypt("test)
  </code></pre>
  
  <p>But this does not:</p>
  
  <pre><code>function encrypt($a, $key){
    $letter=[int][char]$a
    $letter=$letter+$key;
    return [char]$letter
  }
  encrypt("test", 1)
  </code></pre>
  
  <p>It gives me the error in the title.. what am I missing?</p>