views:

237

answers:

3

If you have a null value in a field in a dataset and export it to xml it does "remove" the field tag .. anyway to avoid this..

A: 

An empty tag does not have the same meaning as null, especially for strings. How would you make the difference if the tag was present but empty?

Lucero
null or empty is the same for in this case.
A: 

Think of NULL as a state and everything else as a value. So if you want a blank value, just send in an empty string (single white space)

northpole
A: 

you have to paint your method with an attribute that tells it to stay there. not near my winblows machine so cant give you the actual code. but would look something like this,

[XMLElement(IsNullable = true)]
myProperty {get;set;}
Bluephlame
-1: Note he's talking about a DataSet, so there's no property to put the attribute on.
John Saunders