Click here to Skip to main content
15,889,808 members
Home / Discussions / C#
   

C#

 
AnswerRe: Reading IPTC and XMP from JPEG files Pin
divina22-Dec-05 20:45
divina22-Dec-05 20:45 
QuestionLoading Divx files Pin
Sasuko29-Sep-05 11:42
Sasuko29-Sep-05 11:42 
Question.NET Code Easy to Disassemble Pin
Heinz_29-Sep-05 10:46
Heinz_29-Sep-05 10:46 
AnswerRe: .NET Code Easy to Disassemble Pin
Dave Kreskowiak29-Sep-05 11:30
mveDave Kreskowiak29-Sep-05 11:30 
GeneralRe: .NET Code Easy to Disassemble Pin
Heinz_29-Sep-05 19:36
Heinz_29-Sep-05 19:36 
AnswerRe: .NET Code Easy to Disassemble Pin
Ashok Dhamija29-Sep-05 15:19
Ashok Dhamija29-Sep-05 15:19 
GeneralRe: .NET Code Easy to Disassemble Pin
Heinz_29-Sep-05 19:43
Heinz_29-Sep-05 19:43 
QuestionFastest way to read XML Pin
tommazzo29-Sep-05 8:39
tommazzo29-Sep-05 8:39 
Hi!

If I have a class with a certain number of properties, which I want to save to an XML file, where it is critical that the data can be read back into the variables as fast as possible.
My idea is to create an XmlTextReader and then read the values as follows:
while (reader.Read()) {<br />
    if (reader.NodeType == XmlNodeType.Element) {<br />
        switch (reader.LocalName) {<br />
            case "Prop1": m_Prop1 = reader.ReadString();<br />
                break;<br />
            case "Prop2": m_Prop2 = reader.ReadString();<br />
                break;<br />
            case "Prop3": m_Prop3 = reader.ReadString();<br />
                break;<br />
            case "Prop4": m_Prop4 = reader.ReadString();<br />
                break;<br />
            case "Prop5": m_Prop5 = reader.ReadString();<br />
                break;<br />
            case "Prop6": m_Prop6 = reader.ReadString();<br />
                break;<br />
            default:<br />
                break;<br />
        }<br />
    }<br />
}

I just want to make sure that I am in fact using the fastes possible way. So can anyone think of anything faster?

Thanks already in advance!
AnswerRe: Fastest way to read XML Pin
turbochimp29-Sep-05 9:02
turbochimp29-Sep-05 9:02 
GeneralRe: Fastest way to read XML Pin
tommazzo29-Sep-05 10:51
tommazzo29-Sep-05 10:51 
GeneralRe: Fastest way to read XML Pin
turbochimp29-Sep-05 11:42
turbochimp29-Sep-05 11:42 
GeneralRe: Fastest way to read XML Pin
tommazzo30-Sep-05 4:47
tommazzo30-Sep-05 4:47 
GeneralRe: Fastest way to read XML Pin
turbochimp30-Sep-05 9:31
turbochimp30-Sep-05 9:31 
GeneralRe: Fastest way to read XML Pin
tommazzo30-Sep-05 23:15
tommazzo30-Sep-05 23:15 
QuestionIntegration Updater Appication block with Enterprise Library Pin
davidalcaraz29-Sep-05 8:18
davidalcaraz29-Sep-05 8:18 
QuestionPARTICULAR HELP! CAN ANYONE GUIDE ME? Pin
_Comet_Keeper_29-Sep-05 7:02
_Comet_Keeper_29-Sep-05 7:02 
AnswerRe: PARTICULAR HELP! CAN ANYONE GUIDE ME? Pin
Judah Gabriel Himango29-Sep-05 7:44
sponsorJudah Gabriel Himango29-Sep-05 7:44 
AnswerRe: PARTICULAR HELP! CAN ANYONE GUIDE ME? Pin
WillemM29-Sep-05 7:48
WillemM29-Sep-05 7:48 
AnswerYES... VERY HARD... Pin
_Comet_Keeper_29-Sep-05 9:54
_Comet_Keeper_29-Sep-05 9:54 
GeneralRe: YES... VERY HARD... Pin
Dave Kreskowiak29-Sep-05 10:12
mveDave Kreskowiak29-Sep-05 10:12 
QuestionReading from Excel (quick question) Pin
BECK729-Sep-05 6:20
BECK729-Sep-05 6:20 
AnswerRe: Reading from Excel (quick question) Pin
turbochimp29-Sep-05 8:22
turbochimp29-Sep-05 8:22 
GeneralRe: Reading from Excel (quick question) Pin
BECK729-Sep-05 9:47
BECK729-Sep-05 9:47 
GeneralRe: Reading from Excel (quick question) Pin
turbochimp29-Sep-05 10:58
turbochimp29-Sep-05 10:58 
GeneralRe: Reading from Excel (quick question) Pin
BECK729-Sep-05 11:20
BECK729-Sep-05 11:20 

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.