












Well, I got some great replies on my appearently rookie question..;) .I'll post them here for others to learn from. that's what it's all about , isn't it?
The Problem: Given an XML string, create an instance of the XMLSerializer class, allowing you to construct or serialize an object of a specific type.
There were two solutions right away. They both seem pretty darn obvious - once you read them :) thanks folks!
Solution 1: Use a stringBuilder Object to create a stream
| By : Jan Tielens | |||
|
Solution 2: Use a MemoryStream Object to translate the string into a stream, which is needed to intialize the XMLSerializer
| By Christian Weyer |
|
[...] System.IO.MemoryStream ms = new System.IO.MemoryStream();
ms.Seek(0,
System.IO.SeekOrigin.Begin); public class
TestType |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。