Click here to Skip to main content
15,891,712 members
Home / Discussions / C#
   

C#

 
GeneralOutlook plugin programmer needed Pin
Spinnerdog26-Feb-08 2:18
Spinnerdog26-Feb-08 2:18 
Generaltreeview afterselect problem Pin
Rick van Woudenberg26-Feb-08 1:42
Rick van Woudenberg26-Feb-08 1:42 
GeneralRe: treeview afterselect problem Pin
Bekjong26-Feb-08 2:11
Bekjong26-Feb-08 2:11 
GeneralRe: treeview afterselect problem Pin
John_Adams26-Feb-08 3:03
John_Adams26-Feb-08 3:03 
GeneralRe: treeview afterselect problem Pin
Bekjong26-Feb-08 3:19
Bekjong26-Feb-08 3:19 
GeneralRe: treeview afterselect problem Pin
Xmen Real 26-Feb-08 4:22
professional Xmen Real 26-Feb-08 4:22 
QuestionXml Serialization - deserialize a List problem Pin
Nathan Gloyn26-Feb-08 1:32
Nathan Gloyn26-Feb-08 1:32 
AnswerRe: Xml Serialization - deserialize a List problem Pin
Raji Vulava6-Jan-10 20:11
Raji Vulava6-Jan-10 20:11 
When you have a List of WorkItems, you have to call the Deserialize (which inturn calls the ReadXML) multiple times to load the complete list. You will have to iterate thru the XML Reader (thru the list of WorkItem elements serialized into a single XML file) and call the Deserialize for each WorkItem element, and add the retrived WorkItem to a list. With this logic you can finally populate the List of WorkItems loaded back from XML, into which you have previously serialized the list of WorkItems.

You can try this -

TextReader reader = new StringReader(xmlData);
System.Xml.XmlReader xmlReader = System.Xml.XmlReader.Create( reader );
List<WorkItem> workItemList = new List<WorkItem>( );
try
{
xmlReader.ReadStartElement( );
while ( ( xmlReader.MoveToContent( ) == XmlNodeType.Element && xmlReader.LocalName == typeof( WorkItem ).Name ) )
{
workItemList.Add( ( WorkItem )new XmlSerializer( typeof( WorkItem ) ).Deserialize( xmlReader ) );
xmlReader.Read( );
}
}
catch (Exception ex)
{
}
finally
{
xmlReader.Close();
Reader.Close();
Reader.Dispose();
}
QuestionCompile Visual J# code through C# code [modified] Pin
i_want_to_learn_c#26-Feb-08 0:52
i_want_to_learn_c#26-Feb-08 0:52 
GeneralRe: Compile Visual J# code through C# code Pin
leppie6-Mar-08 3:32
leppie6-Mar-08 3:32 
GeneralRe: Compile Visual J# code through C# code Pin
leppie6-Mar-08 3:32
leppie6-Mar-08 3:32 
Generalloader lock error [modified] Pin
rao raja26-Feb-08 0:45
rao raja26-Feb-08 0:45 
GeneralRe: loader lock error Pin
leppie6-Mar-08 2:33
leppie6-Mar-08 2:33 
Generalproblem with windows service Pin
Prabhat00326-Feb-08 0:45
Prabhat00326-Feb-08 0:45 
GeneralRe: problem with windows service Pin
Vikram A Punathambekar26-Feb-08 1:27
Vikram A Punathambekar26-Feb-08 1:27 
GeneralRe: problem with windows service Pin
Prabhat00326-Feb-08 1:34
Prabhat00326-Feb-08 1:34 
GeneralRe: problem with windows service Pin
Pete O'Hanlon26-Feb-08 9:56
mvePete O'Hanlon26-Feb-08 9:56 
GeneralRe: problem with windows service Pin
Prabhat00326-Feb-08 18:51
Prabhat00326-Feb-08 18:51 
GeneralIssue regarding Serialization [modified] Pin
free_soul42426-Feb-08 0:38
free_soul42426-Feb-08 0:38 
GeneralRe: Issue regarding Serialization Pin
Le centriste26-Feb-08 4:58
Le centriste26-Feb-08 4:58 
QuestionWriting an Image in Excel Cell Comment using C# Pin
Neeraj Kr26-Feb-08 0:28
Neeraj Kr26-Feb-08 0:28 
QuestionExecuting an EXE Pin
M. J. Jaya Chitra26-Feb-08 0:26
M. J. Jaya Chitra26-Feb-08 0:26 
GeneralRe: Executing an EXE Pin
Luc Pattyn26-Feb-08 0:29
sitebuilderLuc Pattyn26-Feb-08 0:29 
QuestionDraw Text in C# using OpenGL Pin
Yasir Nawazish Ali26-Feb-08 0:18
Yasir Nawazish Ali26-Feb-08 0:18 
GeneralRe: Draw Text in C# using OpenGL Pin
Christoph Menge26-Feb-08 1:05
Christoph Menge26-Feb-08 1:05 

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.