2011-01-07 15 views
2

我有以下代碼:XmlDocument存在什麼組合,以及如何使用它?

using System.Xml; 
namespace MyApp { 
    public class Foo : IBar { 
    public void SomeCallback(object sender, CallbackEventArgs e) { 
     string s = e.Result; 
     System.Xml.XmlDocument xml; // <-- Error CS0234. 
     ... 

這導致error CS0234: The type or namespace name 'XmlDocument' does not exist in the namespace 'System.Xml' (are you missing an assembly reference?)

我已驗證的System.Xml下在Solution Explorer 「參考」 收錄。它被列爲使用2.0.x.x,但這應該沒問題,因爲類allegedly existed呢?

我不太熟悉.net開發,所以我不知道如何解決這個問題。

+0

使用XML的教程頁面你.NET 4.0使用? – 2011-01-07 00:32:22

+0

是的。根據Properties視圖,程序集的路徑是:`C:\ Program Files(x86)\ Reference Assemblies \ Microsoft \ Framework \ Silverlight \ v4.0 \ Profile \ WindowsPhone \ System.Xml.dll` – 2011-01-07 00:36:00

回答

相關問題