2012-02-22 83 views

回答

2

試試這個:

 StreamResourceInfo s = Application.GetResourceStream(new Uri("Directory Under Silverlight Root/FileName.xml", UriKind.Relative)); 

     var sr = new StreamReader(s.Stream); 
     // do whatever you need to do with the streamreader 
     while (!sr.EndOfStream) 
     { 
      var line = sr.ReadLine(); 
      //do stuff 


     } 

編輯:xml文件的生成操作應該是「內容」和其複製到輸出目錄應該是「不要複製」

相關問題