当我尝试将文件类型字段添加到自定义列表时,我得到
System.InvalidOperationException: Operation is not valid due to the current state of the object
Guid listGuid = adminWeb.Lists.Add(queueListName, "DotNetNuke Document Queue", SPListTemplateType.GenericList);
queueList = adminWeb.Lists[listGuid];
queueList.Fields.Add("Status", SPFieldType.File, false);
queueList.Update();