vs2019 c#与c++传递字符串时 需要转化

 

参考:https://blog.csdn.net/weixin_30561425/article/details/99779090

string s = "asdf";
            //字符转char
        char[] c = s.ToCharArray();

        Console.WriteLine(s[0]);
            //char转string
        string s1 = c.ToString();
        Console.WriteLine(s);
        Console.ReadKey();

 

转载于:https://www.cnblogs.com/zywf/p/4501861.html

 

string s = "asdf";
            //字符转char
        char[] c = s.ToCharArray();

        Console.WriteLine(s[0]);
            //char转string
        string s1 = c.ToString();
        Console.WriteLine(s);
        Console.ReadKey();

 

相关文章:

  • 2021-12-25
  • 2022-02-27
  • 2021-06-16
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案