由于其保护级别,SerializableAttribute无法访问

时间:2015-12-06 22:32:49

标签: c# serialization xamarin xsd xml-serialization

我在命令提示符下使用xsd.exe创建了一个可序列化的类,该类的结果如下所示,但VS给出了编译错误SerializableAttribute is inaccessible due to its protection levelDesignerCategoryAttribute相同。我不知道如何解决这个问题。谁能在这里给我点灯?

我正在使用VS2015。 Xamarin Cross Platform,便携式应用程序。

所有属性都是公共的,rss如下所示是root属性。

using System.Xml.Serialization;

namespace RssResponse {        

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
    [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=false)]
    public partial class rss {

        private rssChannel channelField;

        private decimal versionField;

        private string baseField;

0 个答案:

没有答案