我正在使用方法 - getComments - 檢索用戶輸入並使用xmlElements到我的soap webservice。在這個方法被調用的時候,我收到一個空引用,VStudio問我一個新的對象。這裏是我收到錯誤的代碼:Xml C#Html編碼錯誤
XmlElement msgbodyElement = (XmlElement)messageElement.ChildNodes[0];
msgbodyElement.InnerText = HttpUtility.UrlEncode (getCommentInformation());
想法?特定錯誤:System.NullReferenceException:未將對象引用設置爲對象的實例。
謝謝。
'這裏是我收到錯誤的代碼,是的,那麼哪個是拋出異常呢?什麼是確切的例外? –
使用你的調試器.... –
哇...對不起..異常是在mscombodyElement在getComments() – smepperson