Saturday

C#(CSharp/dot.net 2.0/Micsrosoft Visual Studio 2005)How to read string xml into dataset:

C#(CSharp/dot.net 2.0/Micsrosoft Visual Studio 2005)How to read string xml into dataset:

   24 string ready= (String.Format("{0}", str));
   25 Stream s = new MemoryStream(ASCIIEncoding.Default.GetBytes(ready));
   26 DataSet ds = new DataSet();
   27 ds.ReadXml(s);

1 comment:

Anonymous said...

another way to do it with StringReader


public DataSet readxml(string s) {
System.IO.StringReader xmlSR = new System.IO.StringReader(s);
DataSet ds10 = new DataSet();
ds10.ReadXml(xmlSR);
return ds10;
}

test smtp server with powershell

Send-MailMessage -SMTPServer smtp.domain.com -To [email protected] -From [email protected] -Subject "This is a test email" -Body ...