C#中遍历字符串中的每个字符的 一月 24, 2019 string testStr = "abc123"; foreach (char c in testStr) { Console.WriteLine(c.ToString()); } 或者 string testStr = "abc123"; for (int counter = 0; counter < testStr.Length; counter++) { Console.WriteLine(testStr[counter]); } 共享 获取链接 Facebook X Pinterest 电子邮件 其他应用 共享 获取链接 Facebook X Pinterest 电子邮件 其他应用 评论
评论
发表评论