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

C#

 
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 
AnswerRe: Fastest way to read XML Pin
turbochimp29-Sep-05 9:02
turbochimp29-Sep-05 9:02 
Why not just use XML serialization to write the instance to XML (assuming you're able to serialize everything you need to get using XML serialization)?

Example (assuming you wanted to save the XML file to disk):

// Saves the class instance to disk.
string path = @"C:\MyClassInstance.xml";
XmlSerializer serializer = new XmlSerializer(typeof(MyClass));
using(StreamWriter writer = new StreamWriter(path, false))
{
    serializer.Serialize(writer, myInstance); // assumes myInstance is an object of the type MyClass...
    writer.Close();
}

// Loads the class instance XML file from disk and deserializes it
MyClass instance = null;
string path = @"C:\MyClassInstance.xml";
if(File.Exists(path))
{
    XmlSerializer serializer = new XmlSerializer(typeof(MyClass));
    using(StreamReader reader = new StreamReader(path))
    {
        info = serializer.Deserialize(reader) as MyClass;
        reader.Close();
    }
}


That should be pretty fast...


The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’

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 
GeneralRe: Reading from Excel (quick question) Pin
turbochimp29-Sep-05 12:12
turbochimp29-Sep-05 12:12 

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.