sunny123456

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

C#string与char互转
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();
posted on 2022-06-06 22:55  sunny123456  阅读(833)  评论(0编辑  收藏  举报