tarihinde NonSerialized aşağıdaki hatayı alıyorum bumülkiyet
[XmlIgnore]
[NonSerialized]
public List<string> paramFiles { get; set; }
gibi kod: Ben
[field: NonSerialized]
aşağıdaki uyarıyı almak yazarsanız
Attribute 'NonSerialized' is not valid on this declaration type.
It is only valid on 'field' declarations.
'field' is not a valid attribute location for this declaration.
Valid attribute locations for this declaration are 'property'.
All attributes in this block will be ignored.
Ben
[property: NonSerialized]
yazarsanız alıyorum (tekrar) aşağıdaki hata:
Attribute 'NonSerialized' is not valid on this declaration type.
It is only valid on 'field' declarations.
nasıl bir özellikte [NonSerialized]
kullanabilir?
[XmlIgnore]
[ScriptIgnore]
public List<string> paramFiles { get; set; }
:
Olası kopyası [Özellik, json için seri hale getirilemez olarak nasıl işaretlenir?] (Http://stackoverflow.com/questions/5103200/how-to-mark-a-property-as-non-serializable-for- json) –