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 關注
- 150 瀏覽
添加回答
舉報
0/150
提交
取消