Strona głównaSztuka programowania

Today a friend showed me a piece of code that was supposed to serialize some Model to XML string without any consideration for custom namespaces apart from defined in given Model. Ok, so we need an instance of XmlSerializer for Model’s type and we will use XmlWriter to write through some MemoryStream and read the contents at the end. Seems quite obvious but is it? Let's dive into caveats of stream processing.

Tagi: .Net, C# .NET, stream, xml
Źródło: mszynka.pl
Dziel się z innymi:
XmlWriter forces stream to close

Sztuka programowania 1846 dni, 19 godzin, 37 minut temu mszynka 28 pokaż kod licznika zwiń

Wczytywanie artykułów...

Najaktywniejsi w tym miesiącu