Click here to Skip to main content
15,923,051 members
Home / Discussions / C#
   

C#

 
GeneralRe: ReLoad Form Problem Pin
Luc Pattyn17-Jul-07 2:09
sitebuilderLuc Pattyn17-Jul-07 2:09 
AnswerRe: ReLoad Form Problem Pin
Nisar Inamdar17-Jul-07 0:27
Nisar Inamdar17-Jul-07 0:27 
GeneralRe: ReLoad Form Problem Pin
monafr8117-Jul-07 1:07
monafr8117-Jul-07 1:07 
GeneralRe: ReLoad Form Problem Pin
PhilDanger17-Jul-07 4:55
PhilDanger17-Jul-07 4:55 
GeneralRe: ReLoad Form Problem Pin
Martin#17-Jul-07 20:08
Martin#17-Jul-07 20:08 
QuestionPassing a String Array in a Dictionary to a WCF service Pin
Projjal17-Jul-07 0:10
Projjal17-Jul-07 0:10 
AnswerRe: Passing a String Array in a Dictionary to a WCF service Pin
Eduard Keilholz17-Jul-07 0:57
Eduard Keilholz17-Jul-07 0:57 
Questiona question about using sn.exe - private key Pin
mhp13017-Jul-07 0:09
mhp13017-Jul-07 0:09 
AnswerRe: a question about using sn.exe - private key Pin
Mike Dimmick17-Jul-07 1:16
Mike Dimmick17-Jul-07 1:16 
Questiontwo commands are possible Pin
srinivassam16-Jul-07 23:52
srinivassam16-Jul-07 23:52 
AnswerRe: two commands are possible Pin
Nisar Inamdar16-Jul-07 23:59
Nisar Inamdar16-Jul-07 23:59 
AnswerRe: two commands are possible Pin
Mike Dimmick17-Jul-07 2:21
Mike Dimmick17-Jul-07 2:21 
QuestionRDLC Pin
manoj_ce16-Jul-07 23:37
manoj_ce16-Jul-07 23:37 
QuestionBest practice for ADO.NET and C# Pin
matbuk16-Jul-07 23:08
matbuk16-Jul-07 23:08 
AnswerRe: Best practice for ADO.NET and C# Pin
Colin Angus Mackay16-Jul-07 23:17
Colin Angus Mackay16-Jul-07 23:17 
GeneralRe: Best practice for ADO.NET and C# Pin
matbuk16-Jul-07 23:33
matbuk16-Jul-07 23:33 
GeneralRe: Best practice for ADO.NET and C# Pin
Colin Angus Mackay16-Jul-07 23:47
Colin Angus Mackay16-Jul-07 23:47 
GeneralRe: Best practice for ADO.NET and C# Pin
matbuk16-Jul-07 23:55
matbuk16-Jul-07 23:55 
QuestionCopying one class to another Pin
Berlus16-Jul-07 22:54
Berlus16-Jul-07 22:54 
AnswerRe: Copying one class to another Pin
Martin#16-Jul-07 23:00
Martin#16-Jul-07 23:00 
QuestionText on Video using DirectX Pin
Sukhjinder_K16-Jul-07 22:46
Sukhjinder_K16-Jul-07 22:46 
AnswerRe: Text on Video using DirectX Pin
Eduard Keilholz16-Jul-07 23:44
Eduard Keilholz16-Jul-07 23:44 
QuestionXML Serialization Pin
blackjack215016-Jul-07 22:46
blackjack215016-Jul-07 22:46 
AnswerRe: XML Serialization Pin
J4amieC16-Jul-07 23:36
J4amieC16-Jul-07 23:36 
GeneralRe: XML Serialization Pin
blackjack215017-Jul-07 1:03
blackjack215017-Jul-07 1:03 
Thanks for the interest.

But it's not about attributes. It's about the value itself.

Let me give you an example:

Say I have the simple class:

class Human
{
public string name;
public int age;
public int height;
public char gender;
}

If I declare a "Human" variable and give values to some of the fields, but not all:

Human John = new Human();
John.name = "John Stevens";
John.age = 23;

I don't give any value to the height and gender fields.
After that I serialize this class to XML.
The output will be:

<xml...>
<Human>
<name>John Stevens</name>
<age>23</age>
</Human>

You notice that there are no tags for height and gender because these values were not initialized.

Bottom line:
Is there a way to get this output xml for the same chain of events as described above?

<xml...>
<Human>
<name>John Stevens</name>
<age>23</age>
<height />
<gender />
</Human>

Thanks.

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.