其他分享
首页 > 其他分享> > 便携式类库中是否支持XmlTextReader?

便携式类库中是否支持XmlTextReader?

作者:互联网

根据list of available namespaces in a PCL project,包括System.Xml.但是,引用XmlTextReader(位于System.Xml命名空间中)时出现编译错误.

我的目标是.NET 4.0 Silverlight 5(Profile14).我还尝试了.NET4.0.3 SL(Profile19)和.NET 4.5 SL(Profile24),都一样.

XmlTextReader应该在PCL中可用吗?如果没有,我在哪里可以找到哪些可用类的明确列表?

解决方法:

不是,但是您可以改用XmlReader.Create().顺便说一句,这是推荐的解决方案for full .Net too

Note

Starting with the .NET Framework 2.0, we recommend that you create XmlReader instances by using the XmlReader.Create method to take advantage of new functionality.

像往常一样,有a tool for that.而here是它的简短介绍.

标签:cross-platform,portable-class-library,xml,c,net
来源: https://codeday.me/bug/20191122/2057055.html