本文介绍了C#中的字符串长度是1 +实际字符串长度值,我疯了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
这是我第一次看到这种行为。使用这个简单的代码
string strInput = 1100100100001111110110101010001000100001011010001100001000110100; int strlen = strInput.Length;
和一串64个字符,我的长度为65.
i获得实际长度+1,每个字符串放在strInput !!中。我该如何解决这个问题?
提前致谢!
我尝试了什么:
更改操作系统中的语言设置,但没有结果
解决方案
Hello,
this is the 1st time i see this behavior. With this simple code
string strInput = "1100100100001111110110101010001000100001011010001100001000110100"; int strlen = strInput.Length;
and a string of 64 chars i get length of 65.
i get real length +1 with every string i put in strInput!!. How can i solve this?
Thanks in advance!
What I have tried:
to change language settings in OS but with no result
解决方案
这篇关于C#中的字符串长度是1 +实际字符串长度值,我疯了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!