SPWeb.GetFolder尽管我的输入是一个值,但我无法将字符串值传递给我string。private static void UploadEmlToSp(string sharePointSite, string sharePointDocLib, string emlFullPath, string requestNo){ using (SPSite oSite = new SPSite(sharePointSite)) { using (SPWeb oWeb = oSite.OpenWeb()) { if (!System.IO.File.Exists(emlFullPath)) throw new FileNotFoundException("File not found.", emlFullPath); SPFolder myLibrary = oWeb.Folders[sharePointDocLib]; if (SPWeb.GetFolder(requestNo).Exists) <--errored { //Folder Exisits }我可以知道我错过了什么吗?以下是错误消息。An object reference is required for the non-static field, method, or property SPWeb.GetFolder(string)
- 3 回答
- 0 关注
- 106 浏览
添加回答
举报
0/150
提交
取消