title: How do I convert this c++ function to c#?
body: <p>I tried using the online converter but it didn't work out. </p>
  
  <p>The C++ function is as below. I want it's equivalent in c#.</p>
  
  <pre><code>//! Save the SURF features to file
  void saveSurf(char *filename, vector&lt;Ipoint&gt; &amp;ipts)
  {
    ofstream outfile(filename);
  
    // output descriptor length
    outfile &lt;&lt; "64\n";
    outfile &lt;&lt; ipts.size() &lt;&lt; "\n";
  
    // create output line as:  scale  x  y  des
    for(unsigned int i=0; i &lt; ipts.size(); i++) 
    {
      outfile &lt;&lt; ipts.at(i).scale &lt;&lt; "  ";
      outfile &lt;&lt; ipts.at(i).x &lt;&lt; " ";
      outfile &lt;&lt; ipts.at(i).y &lt;&lt; " ";
      outfile &lt;&lt; ipts.at(i).orientation &lt;&lt; " ";
      outfile &lt;&lt; ipts.at(i).laplacian &lt;&lt; " ";
      outfile &lt;&lt; ipts.at(i).scale &lt;&lt; " ";
      for(int j=0; j&lt;64; j++)
        outfile &lt;&lt; ipts.at(i).descriptor[j] &lt;&lt; " ";
  
      outfile &lt;&lt; "\n";
    }
  
    outfile.close();
  }
  </code></pre>
  
  <p>I think ofstream is streamwriter or may be filestream. </p>