Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [XmlRoot("foo")]
- public class Foo
- {
- static void Main()
- {
- XmlSerializer serializer = new XmlSerializer(typeof(Foo));
- string xml = @"<foo name='ack' />";
- using (StringReader sr = new StringReader(xml))
- {
- Foo foo = serializer.Deserialize(sr) as Foo;
- }
- }
- [XmlAttribute("name")]
- public string Name { get; set; }
- public Foo Bar { get; private set; }
- }
- <system.diagnostics>
- <switches>
- <add name="XmlSerialization.Compilation" value="1" />
- </switches>
- </system.diagnostics>
- <system.xml.serialization>
- <xmlSerializer tempFilesLocation="c:\foo"/>
- </system.xml.serialization>
- <system.xml.serialization>
- <xmlSerializer tempFilesLocation="c:\foo"/>
- </system.xml.serialization>
Add Comment
Please, Sign In to add comment