title: How to use C# static string with Nlua
body: <p>I am using NLua for script interface with my application.
  I want to send keyboard input from LUA language to my C# code.</p>
  
  <p>I do with this C# code.</p>
  
  <pre><code>   using (Lua lua = new Lua())
     {
        lua.LoadCLRPackage();
  
        lua.RegisterFunction("keypressC", null, typeof(TestNLUA).GetMethod("keypressC"));
        lua.RegisterFunction("keypressS", null, typeof(TestNLUA).GetMethod("keypressS"));
  
        lua["Key"] = new SpecialKey();
     }
  
      public class SpecialKey
      {
          public static readonly char EnterC = '\uE007'; 
          public static readonly string EnterS = Convert.ToString(EnterC);
      }
  
     public class TestNLUA
     {
        public static void keypressC(char key)
        {
           // key = 57351 =&gt; OK
        }
  
        public static void keypressS(string key)
        {
           char[] akey = key.ToCharArray();
           // akey[0] = 63 = ? (question mark) =&gt; KO
        }
     }
  </code></pre>
  
  <p>And in LUA Script I do</p>
  
  <pre><code>keypressC(Key.EnterC)
  keypressS(Key.EnterS)
  </code></pre>
  
  <p>In keypressC, Nlua passe value 57351 to key parameter. It's OK.</p>
  
  <p>In keypressS, Nlua passe value "?" to key parameter. It's KO. 
  I have no idea why there is the character "?". 
  Looks like a marshaling error in NLua (i.e. LuaInterface)?</p>
  
  <p>Can you help me?</p>