C#文本框串分离 [英] C# Textbox string separation
问题描述
我有文本框,在C#中,包含两个或三个字符串用空格。我想存储这些字符串seperately.please,建议我的任何代码。感谢名单。
VAR复数值= @asdfasdfsdf asdfasd FFFFF
asdfasdfasdf ;
VAR complexValues = complexValue.Split();
注意:结果
.Split()
是一个伪超载,因为它被编译为 .Split(新的char [0])
。结果
另外 MSDN 告诉我们:
如果分隔参数为
空或包含
没有字符,空白字符
被认为是分隔符。
空白字符由$ B $定义B中的Unicode标准,如果他们被传递到
返回true,
Char.IsWhiteSpace
方法。
块引用>I have textbox in c#, contains two or three strings with white spaces. i want to store those strings seperately.please, suggest me any code. thanx.
解决方案var complexValue = @"asdfasdfsdf asdfasd fffff asdfasdfasdf"; var complexValues = complexValue.Split();
NOTICE:
.Split()
is a pseudo-overload, as it gets compiled as.Split(new char[0])
.
additionally msdn tells us:If the separator parameter is null or contains no characters, white-space characters are assumed to be the delimiters. White-space characters are defined by the Unicode standard and return true if they are passed to the
Char.IsWhiteSpace
method.
这篇关于C#文本框串分离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!