Click here to Skip to main content
15,903,385 members
Home / Discussions / C#
   

C#

 
GeneralWebParts.. Pin
razanabanu3-Feb-08 23:24
razanabanu3-Feb-08 23:24 
GeneralRe: WebParts.. Pin
_tasleem4-Feb-08 1:27
_tasleem4-Feb-08 1:27 
QuestionHow to capture Pc remote control keycodes? Pin
dudiba3-Feb-08 23:18
dudiba3-Feb-08 23:18 
GeneralEdit Data in DataGridView Control Pin
D i x y3-Feb-08 22:50
D i x y3-Feb-08 22:50 
GeneralRe: Edit Data in DataGridView Control Pin
Mircea Puiu3-Feb-08 23:50
Mircea Puiu3-Feb-08 23:50 
QuestionElement name of serialized List<t></t> Pin
Nathan Gloyn3-Feb-08 22:45
Nathan Gloyn3-Feb-08 22:45 
GeneralRe: Element name of serialized List Pin
TJoe4-Feb-08 1:59
TJoe4-Feb-08 1:59 
GeneralRe: Element name of serialized List Pin
Nathan Gloyn4-Feb-08 3:01
Nathan Gloyn4-Feb-08 3:01 
Sorry Tom,

Just realised code posted not quite correct I'm using:
<br />
            XmlSerializerNamespaces ns = new XmlSerializerNamespaces();<br />
            ns.Add("", "");<br />
<br />
            XmlSerializer s = new XmlSerializer(typeof(LookupItem));<br />
<br />
            XmlWriterSettings settings = new XmlWriterSettings();<br />
            settings.OmitXmlDeclaration = true;<br />
<br />
            StringWriter output = new StringWriter();<br />
            XmlWriter writer = XmlWriter.Create(output, settings);<br />
<br />
            //TextWriter w = new StreamWriter();<br />
            s.Serialize(writer, toSerialize, ns);<br />
            writer.Close();<br />
<br />
            return output.ToString();<br />


The root element won't help unfortunately since I'm trying to serialise a List<t>, even if I did create a specialist list based on type T all I get output is the correct root element, the issue is the items in the list being output with the correct element name as specified by myself using XmlRoot("Item") on the class that is stored in the list.



GeneralRe: Element name of serialized List Pin
TJoe4-Feb-08 3:08
TJoe4-Feb-08 3:08 
GeneralRe: Element name of serialized List Pin
Nathan Gloyn4-Feb-08 3:24
Nathan Gloyn4-Feb-08 3:24 
GeneralRe: Element name of serialized List Pin
TJoe4-Feb-08 3:47
TJoe4-Feb-08 3:47 
GeneralRe: Element name of serialized List Pin
Nathan Gloyn4-Feb-08 4:08
Nathan Gloyn4-Feb-08 4:08 
GeneralHitting Back button Pin
razanabanu3-Feb-08 22:35
razanabanu3-Feb-08 22:35 
GeneralRe: Hitting Back button Pin
Mircea Puiu3-Feb-08 23:55
Mircea Puiu3-Feb-08 23:55 
QuestionIs there free code for plot 3D figures? Pin
Seraph_summer3-Feb-08 21:22
Seraph_summer3-Feb-08 21:22 
AnswerRe: Is there free code for plot 3D figures? Pin
Mircea Puiu3-Feb-08 23:56
Mircea Puiu3-Feb-08 23:56 
Questionhow to read filename? Pin
samidhas3-Feb-08 21:15
samidhas3-Feb-08 21:15 
GeneralRe: how to read filename? Pin
N a v a n e e t h3-Feb-08 21:41
N a v a n e e t h3-Feb-08 21:41 
GeneralRe: how to read filename? Pin
samidhas3-Feb-08 22:41
samidhas3-Feb-08 22:41 
QuestionGiving privilege certificate to an app??? Pin
Shivaprasad3-Feb-08 20:11
Shivaprasad3-Feb-08 20:11 
QuestionPassing parameters while debugging?? Pin
Muammar©3-Feb-08 19:55
Muammar©3-Feb-08 19:55 
AnswerRe: Passing parameters while debugging?? Pin
Martin#3-Feb-08 21:46
Martin#3-Feb-08 21:46 
GeneralRe: Passing parameters while debugging?? Pin
Muammar©4-Feb-08 2:32
Muammar©4-Feb-08 2:32 
GeneralRe: Passing parameters while debugging?? Pin
N a v a n e e t h3-Feb-08 22:31
N a v a n e e t h3-Feb-08 22:31 
GeneralRe: Passing parameters while debugging?? Pin
Muammar©4-Feb-08 2:33
Muammar©4-Feb-08 2:33 

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.