问题:
string[] sArray = html.Split(new char[] { '
', '
' });原因:
Split()里面是用char类型不是string字符串类型,所以只能用一个字符,必须先把多个字符替换成一个字符,然后再分割。
解决方案一:
string html = "
第二百三十六章 古神精神印记
";html = html.Replace("
","*").Replace("
","*");string title = html.Split('*')[]; // 第二百三十六章 古神精神印记
解决方案二:
string title = html.Split(new string[] { "
", "
" }, StringSplitOptions.RemoveEmptyEntries)[];.NET 中字符文本中的字符太多 错误处理
错误截图 问题描述 在ASP.NET中使用多层引号,要引起注意,引号使用不当会引起“字符文本中字段太多”编译错误!今天我就遇到了这个错误,整理于此! “字符文本中字段太多”错误提示过 ...
纯手动拉WebPanel页面保存出现错误提示 ";error:字符文本中的字符太多";
环境为.Net 没有使用WorkWith