Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / January 2006

Tip: Looking for answers? Try searching our database.

Xml and propertygrid  Attributes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Romain TAILLANDIER - 09 Jan 2006 09:49 GMT
Hi group,

I have a Parameter class, and i need it to be
XmlSerialisable/XmlDeserialisable, and browsable with a property grid using
custom specification about itself but customising property attribute.

example :

[CategoryAttribute("DataBase"),
 DefaultValueAttribute(0),
 Description("The datatable name.")]
 public string TableDB{get{...}set{...}}

Before i had those three attribute, Xml serialisation works perfectly. Since
i had them, it crash with errors at System.Refletion.Assembly.nLoad(...) in
a dynamically generated Dll (I guess).

If i had the XmlIgnore attribute, it works !

So i deduce that other attribute make crush the xml serialisation.
Why ?
Is there tun arround ? or idea to correct that ?

thanks
ROM
Romain TAILLANDIER - 09 Jan 2006 16:19 GMT
I found it !!

it was caused by the DefaultValueAttribute.
[CategoryAttribute("DataBase"),
DefaultValueAttribute(""),
Description("The datatable name.")]
public string TableDB{get{...}set{...}}

put 0 in it make the XmlSerializer crush.
Note that the string.empty too, this is a mistery too

thanks group

> Hi group,
>
[quoted text clipped - 23 lines]
> thanks
> ROM

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.