title: How do I convert a System::String^ to const char*?
body: <p>I'm developing an app in C++/CLI and have a csv file writing library in unmanaged code that I want to use from the managed portion. So my function looks something like this:</p>
  
  <pre><code>bool CSVWriter::Write(const char* stringToWrite);
  </code></pre>
  
  <p>...but I'm really struggling to convert my shiny System::String^ into something compatible. Basically I was hoping to call by doing something like:</p>
  
  <pre><code>if( m_myWriter-&gt;Write(String::Format("{0}",someValueIWantToSave)) )
  {
      // report success
  }
  </code></pre>