title: How do you convert a 'System::String ^' to 'TCHAR'?
body: <p>i asked a question <a href="https://stackoverflow.com/questions/5665717/how-do-you-call-a-c-method-in-c">here</a> involving C++ and C# communicating. The problem got solved but led to a new problem.</p>
  
  <p>this returns a String (C#)</p>
  
  <pre><code>return Marshal.PtrToStringAnsi(decryptsn(InpData));
  </code></pre>
  
  <p>this expects a TCHAR* (C++)</p>
  
  <pre><code>lpAlpha2[0] = Company::Pins::Bank::Decryption::Decrypt::Decryption("123456");
  </code></pre>
  
  <p>i've googled how to solve this problem, but i am not sure why the String has a carrot(^) on it. Would it be best to change the return from String to something else that C++ would accept? or would i need to do a convert before assigning the value?</p>