Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why I must use a string reader?
Message
De
26/03/2002 02:49:38
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Why I must use a string reader?
Divers
Thread ID:
00637118
Message ID:
00637118
Vues:
44
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform