Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why I must use a string reader?
Message
From
26/03/2002 02:49:38
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Why I must use a string reader?
Miscellaneous
Thread ID:
00637118
Message ID:
00637118
Views:
46
Hi!

Ok, I´m getting to make something with this C#... :)

I´ve a code like this:
// My VFP COM DLL instantiation
RapoZineClass oRZ = new RapoZineClass();

// let´s invoke a method which return a XML string (with in-line schema)
string edicoes = oRZ.TrazerEdicoes().ToString();

// create a DataSet
DataSet myDS = new DataSet();

// Use the StringReader to read my XML string
System.IO.StringReader xmlSR = new System.IO.StringReader(edicoes);

// Load my DataSet with my XML
myDS.ReadXml(xmlSR, XmlReadMode.ReadSchema);
well, ok, that works... my doubt is: Do I really need to use this StringReader? Why I cannot simply read the XML string right from the DataSet??

Once more: is the code above good, or I must make something different, in order to follow some "best practices"?

TIA
Claudio Lassala
Next
Reply
Map
View

Click here to load this message in the networking platform