Click here to Skip to main content
16,007,885 members
Home / Discussions / C#
   

C#

 
GeneralRe: Multiple Forms question Pin
Mutty17-Aug-05 1:37
Mutty17-Aug-05 1:37 
GeneralDrive use "net use" does not be actived. Pin
coby cai13-Aug-05 15:10
professionalcoby cai13-Aug-05 15:10 
GeneralSearch files.. Pin
nc3b13-Aug-05 11:14
nc3b13-Aug-05 11:14 
GeneralRe: Search files.. Pin
Vasudevan Deepak Kumar14-Aug-05 1:54
Vasudevan Deepak Kumar14-Aug-05 1:54 
GeneralRe: Search files.. Pin
nc3b14-Aug-05 5:52
nc3b14-Aug-05 5:52 
GeneralNumericUpDown Control Pin
Yigal Agam13-Aug-05 9:51
Yigal Agam13-Aug-05 9:51 
GeneralRe: NumericUpDown Control Pin
Daniel Grunwald13-Aug-05 10:48
Daniel Grunwald13-Aug-05 10:48 
GeneralXML Deserialisation and Default Values Pin
MrEyes13-Aug-05 9:48
MrEyes13-Aug-05 9:48 
Hello all,

I have an XML schema that has been converted to a class file using the Framework XSD tool, this schema has default values specified within it and these have been carried across into the schema class. If I read in an XML file and then deserialise it to an object if any of the elements are not present the default value is picked up and the object uses that instead.

All it good, code works fine, I have happy little imps running around inside my head.

but......

For logging purposes I would like to know when this happens, ie. when the deserialiser uses the class based default value. The only solution I can think of is to parse through either the text XML or the desrialised object, which is an for to much additional processing for my liking.

Parsing the object values also present the problem that the XML file may actually contain the default value so you wouldnt know if it came from the XML file or the class defaults.

On a similar subject, XSD generate default values using the following header:

[System.ComponentModel.DefaultValueAttribute("localhost")]
public string blah = "localhost";


Is there any way in code I can access the DefaultValueAttribute??

post.mode = postmodes.signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42
Generaliphlpapi.dll and sendarp Pin
Genbox13-Aug-05 8:24
Genbox13-Aug-05 8:24 
GeneralRe: iphlpapi.dll and sendarp Pin
Bojan Rajkovic13-Aug-05 19:07
Bojan Rajkovic13-Aug-05 19:07 
GeneralRe: iphlpapi.dll and sendarp Pin
Genbox13-Aug-05 23:58
Genbox13-Aug-05 23:58 
GeneralRe: iphlpapi.dll and sendarp Pin
Rob Graham14-Aug-05 1:27
Rob Graham14-Aug-05 1:27 
GeneralRe: iphlpapi.dll and sendarp Pin
Anonymous14-Aug-05 2:38
Anonymous14-Aug-05 2:38 
GeneralRe: iphlpapi.dll and sendarp Pin
Bojan Rajkovic14-Aug-05 11:49
Bojan Rajkovic14-Aug-05 11:49 
GeneralRe: iphlpapi.dll and sendarp Pin
mohsenbz12-Feb-12 20:05
mohsenbz12-Feb-12 20:05 
GeneralZoming problem in c# Pin
wasife13-Aug-05 7:30
wasife13-Aug-05 7:30 
GeneralRe: Zoming problem in c# Pin
Guffa13-Aug-05 7:35
Guffa13-Aug-05 7:35 
GeneralDistribute my software to other computers Pin
Ming Luo13-Aug-05 1:00
Ming Luo13-Aug-05 1:00 
GeneralRe: Distribute my software to other computers Pin
User 665813-Aug-05 1:39
User 665813-Aug-05 1:39 
GeneralRe: Distribute my software to other computers Pin
Ming Luo13-Aug-05 5:22
Ming Luo13-Aug-05 5:22 
GeneralRe: Distribute my software to other computers Pin
User 665813-Aug-05 7:50
User 665813-Aug-05 7:50 
Generalproblem with asynchronous server Pin
bahith13-Aug-05 0:40
bahith13-Aug-05 0:40 
GeneralRe: problem with asynchronous server Pin
Vasudevan Deepak Kumar14-Aug-05 1:55
Vasudevan Deepak Kumar14-Aug-05 1:55 
GeneralRe: problem with asynchronous server Pin
S. Senthil Kumar14-Aug-05 3:31
S. Senthil Kumar14-Aug-05 3:31 
GeneralDatetimePicker in a datagrid Pin
deep712-Aug-05 21:36
deep712-Aug-05 21:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.