[MonoDevelop] [NonSerialized] causes property to be null.
Eric Hosick
erichosick at interfacevision.com
Mon Sep 2 18:00:44 UTC 2013
Hi all,
Strange behavior just wanted to know if it is expected:
[NonSerialized] private Hashtable p_wrappedInstance = new Hashtable
();
[XmlIgnore] public Hashtable wrappedInstance {
get {
if ( null == p_wrappedInstance ) {
Console.WriteLine ("This only shows when p_wrappedInstance is
marked as [NonSeralized].");
}
return p_wrappedInstance;
}
set {
if ( null == value ) {
Console.WriteLine ("This is never seen in console.");
}
p_wrappedInstance = value;
}
}
I've removed the [NonSerialized] attribute and things work fine. Just want
to know if this is expected behavior.
Regards,
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/monodevelop-list/attachments/20130902/16250d0c/attachment.html>
More information about the Monodevelop-list
mailing list