110,533
社区成员
发帖
与我相关
我的任务
分享
string str = "1234";
int i = 0;
foreach (var item in str)
{
i++;
}
Console.WriteLine(i);
class Program
{
static void Main(string[] args)
{
byte[] buffer = Encoding.UTF8.GetBytes("testStr");
Console.WriteLine(buffer.Length);
}
}