Windows phone 7 获取错误“;system.xml.xmldictionaryreader不包含CreateTextReader的定义;

Windows phone 7 获取错误“;system.xml.xmldictionaryreader不包含CreateTextReader的定义;,windows-phone-7,Windows Phone 7,我发现错误system.xml.xmldictionaryreader不包含VS2010 Express for Windows phone上“CreateTextReader”的定义。代码是用于网页,它的工作,然后我复制到我的手机应用程序。我添加了“System.Runtime.Serialization”和“using System.xml”作为参考。有人能告诉我怎么解决这个问题吗。谢谢 有两个类正在使用: using System; using System.Net; using Syst

我发现错误system.xml.xmldictionaryreader不包含VS2010 Express for Windows phone上“CreateTextReader”的定义。代码是用于网页,它的工作,然后我复制到我的手机应用程序。我添加了“System.Runtime.Serialization”和“using System.xml”作为参考。有人能告诉我怎么解决这个问题吗。谢谢

有两个类正在使用:

using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.IO;
using System.Xml.Serialization;
using System.Runtime.Serialization;
using System.Collections.Generic;
using System.Xml;
using System.Text;
using System.IO.IsolatedStorage;

   public static T Deserializer<T>(Stream s)
    {
        //Get results   
        var ser = new DataContractSerializer(typeof(T));
        var reader = XmlDictionaryReader.CreateTextReader(s,
            new System.Xml.XmlDictionaryReaderQuotas());
        ser = new DataContractSerializer(typeof(T));
        var deserializedItem = (T)ser.ReadObject(reader, true);
        reader.Close();
        return deserializedItem;
    }
    #endregion
使用系统;
Net系统;
使用System.Windows;
使用System.Windows.Controls;
使用System.Windows.Documents;
使用System.Windows.Ink;
使用System.Windows.Input;
使用System.Windows.Media;
使用System.Windows.Media.Animation;
使用System.Windows.Shapes;
使用System.IO;
使用System.Xml.Serialization;
使用System.Runtime.Serialization;
使用System.Collections.Generic;
使用System.Xml;
使用系统文本;
使用System.IO.IsolatedStorage;
公共静态T反序列化器(流s)
{
//取得成果
var ser=新的DataContractSerializer(typeof(T));
var reader=XmlDictionaryReader.CreateTextReader,
新的System.Xml.XmlDictionaryReaderQuotas());
ser=新的DataContractSerializer(typeof(T));
var deserializedItem=(T)ser.ReadObject(reader,true);
reader.Close();
返回反序列化数据;
}
#端区
手机上没有过载

首先读取byte[]数组中的流,然后向其提供重载