我想将我的String拆分成以下格式::
string filter=" Status~contains~''~and~DossierID~eq~40950~and~CustomerName~eq~'temp'"
我想用 ("~and~")
我正在做类似::
var test=filter.Split("~and~");
但是得到异常。
您不会例外。这甚至不会编译。
该.Split()
方法不接受字符串,仅接受字符串数组。
尝试以下方法:
var test = filter.Split(new[] {"~and~"}, StringSplitOptions.None);
您应该返回三个字符串的列表:
Status~contains~''
DossierID~eq~40950
CustomerName~eq~'temp'
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句