这段代码有什么问题?这段代码有什么问题?为什么列表不能识别?
bool claimExists;
string currentClaimControlNo = "700209308399870";
List<string> claimControlNo = new List<string>();
claimControlNo.Add("700209308399870");
if (claimControlNo.Contains(currentClaimControlNo.Substring(0, 14)))
claimExists = true;
else
claimExists = false;
为什么claimControlNo上面会出现错误? 由于我知道价值存在,我如何调整代码?
的困惑在于事实'子串(INT,INT)'是'子字符串(偏移,长度)',而不是'子串(的startIndex,stopIndex)' – Gus 2013-03-12 16:27:58
什么你想实现不明确。你不是在寻找确切的字符串,或者你不会使用子字符串。我猜@安妮。已经指出了你的目标。那么,它会是平等的,包含,startswith? – jbl 2013-03-12 16:29:42