Thanks, Cor!
I have code that goes in "the wrong direction". VB.NET is not an issue but I
wonder if the System.Text.Encoding might be...
Best regards,
-Andy.
"Cor" <(E-Mail Removed)> wrote in message
news:#LlR1gw#(E-Mail Removed)...
> Hi Andy,
>
> I did make that dataset as a sample to do your problem, but I have another
> sample, I still have.
>
> The only problem for you is that it goes for you in the wrong direction,
but
> I think it cannot be that hard to change that in the right direction :-)
>
> It is also VB.net (But the changes are not that difficult to do in my
> opinion to C#)
>
> If you do nto succeed tell than I will look to it tomorrow.
>
> Cor
>
> Dim ds As New DataSet
> Dim dt As New DataTable("parameters")
> For c As Integer = 1 To 10
> Dim dc As New DataColumn("elem" & c.tostring)
> dt.Columns.Add(dc)
> Next
> For r As Integer = 1 To 10
> Dim dr As DataRow = dt.NewRow
> For c As Integer = 1 To 10
> dr("elem" & c.tostring) = _
> r.ToString & c.tostring ' or just dr(c) but to show you
> Next
> dt.Rows.Add(dr) ' can also before but I find this looking
nicer
> Next
> ds.Tables.Add(dt)
> -------------------------end of building of the testset
>
> Dim ser As XmlSerializer = New XmlSerializer(GetType(DataSet))
> Dim ms As New IO.MemoryStream
> Dim sw As IO.TextWriter = New IO.StreamWriter(ms)
> ser.Serialize(sw, ds)
> Dim b As Long = ms.Length
> ms.Position = 0
> Dim sr As IO.TextReader = New IO.StreamReader(ms)
> Dim xmlstring As String = sr.ReadToEnd
> sw.Close()
> sr.Close()
> ms.Close()
>
>
|