为什么我会有这个错误?
“索引(以零为基础)必须大于或等于零,并且小于参数列表的大小。”
下面的代码呢?
string lookupSchema = "<Field Type='Lookup' DisplayName='{0}' Required='FALSE' EnforceUniqueValues='FALSE' List='{70d6098c-6ba0-4e9e-b101-a60b88fc226a}' ShowField='Title' UnlimitedLengthInDocumentLibrary='FALSE' RelationshipDeleteBehavior='None' StaticName='{0}' Name='{0}'/>";
string columnSchema = string.Format(lookupSchema.ToString(), listOfColumns[1]);发布于 2015-09-29 06:28:42
谢谢你的回答。结果发现,由于大括号的使用,lookupSchema字符串中出现了问题。刚刚把"List='{70d6098c-6ba0-4e9e-b101-a60b88fc226a}'“改成了"List='{{70d6098c-6ba0-4e9e-b101-a60b88fc226a}}'”,现在它已经开始工作了。
https://stackoverflow.com/questions/32820456
复制相似问题