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.
Strona głównaSztuka programowania
Sztuka programowania 2058 dni, 2 godziny, 37 minut temu 32 pokaż kod licznika zwiń