title: C# unsafe type -> char*[] , getting a pointer on char array
body: <p>Have:</p>
  
  <pre><code>[DllImport("OpenAL32.dll")]
  static extern void alcOpenDevice(char*[] devicename);
  </code></pre>
  
  <p>Wanna send the name to this function like smth that:</p>
  
  <pre><code>char[] data = "Hello!".ToCharArray();
  char*[] txt = &amp;data;
  </code></pre>
  
  <p>But getting the errors:</p>
  
  <ul>
  <li><blockquote>
    <p>cannot implicitly convert type <code>char[] *</code> to <code>char * []</code></p>
  </blockquote>
  
  <p>(funny error, because C# compiler refuses to define <code>char[] *</code> in /unsafe mode also :) )</p></li>
  <li><blockquote>
    <p>Cannot take the address of, get the size of, or declare a pointer to a managed type
    (<code>char[]</code>)</p>
  </blockquote></li>
  </ul>
  
  <p>PS<br>
  When does <code>char</code> become managed? It's a struct, isn't it?</p>
  
  <pre><code>public struct Char : IComparable, IConvertible, IComparable&lt;char&gt;, IEquatable&lt;char&gt;
  </code></pre>
  
  <p>Although compiler showed info about declaring the pointer to a managed type (<code>char[]</code>). I can only suggest that when the type is an array CLR may present it like a managed type, but it sounds very crazy.</p>