在Silverlight中不能使用XmlDocument,可以使用XDocument但不能序列化,所以最好推薦使用XElement。可以使用Linq文法查詢其內容。如果是XML字串轉換為XElement,可以用 XDocument.Parse(xmlString).Root;如果是byte[],如何轉換,可以用下面的方法(不要把byte[]先轉換為string,有encoding的潛在問題): 1: byte[] bContent;//輸入的byte[] 2: using (var ms =
用Resharper的同學都知道,如果你寫了一個私人函數,這個函數沒有訪問類裡面的其他參數和方法,那麼它建議你標記這個方法為私人靜態方法,提示是這樣的:值得這樣做嗎?看看微軟的建議:After you mark the methods as static, the compiler will emit non-virtual call sites to these members. Emitting non-virtual call sites will prevent a check at
在Eclipse的JavaEE環境中,點擊run下拉run as- run on server, 選擇index.jsp,啟動tomcat調試失敗,錯誤資訊:Tomcat localhost-config is missing, 'Starting Tomcat v7.0 Server at localhost' has encountered a problem.如何解決? Services,stop Tomcat service,otherwise the port will be in
在使用Silverlight跨域調用遠程WCF Ria Service的時候經常會遇到這個錯誤:The remote server returned an error: NotFound. 這個錯誤又不能debug,怎麼辦?可以開啟WCF Ria Service的tracing功能,記錄trace檔案,然後使用Microsoft Service Trace Viewer查看。首先在WCF Ria
const FILE_PATH:String="main.swf"; const CLASS_NAME:String="MainSwf"; var loader:Loader; var request:URLRequest; loader = new Loader(); request=new URLRequest(FILE_PATH); loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete);