Share Link
Copied to clipboard
Embed on Your Page
Copied to clipboard
We Stand with Ukraine
[Fork] https://stackoverflow.com/questions/53813936/deserialize-an-xml-file-to-object-in-c-sharp by dbc_MinLength
Roslyn 2.0 Compiler; Environment version: 4.0.30319.42000

Input XML: 
<ns0:transmission xmlns:ns0="blabla.xsd">
  <ns0:DiagnosisErrorResponse>
    <ns0:ID>7</ns0:ID>
    <ns0:ErrorCode>9</ns0:ErrorCode>
    <ns0:ErrorDescription>sometext</ns0:ErrorDescription>
    <ns0:ErrorDate>11-12-2018</ns0:ErrorDate>
  </ns0:DiagnosisErrorResponse>
</ns0:transmission>

Deserialied and re-serialized DiagnosisErrorResponse
<?xml version="1.0" encoding="utf-16"?>
<DiagnosisErrorResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="blabla.xsd">
  <ID>7</ID>
  <ErrorCode>9</ErrorCode>
  <ErrorDescription>sometext</ErrorDescription>
  <ErrorDate>11-12-2018</ErrorDate>
</DiagnosisErrorResponse>
Cached Result
Last Run: 10:44:11 am
Compile: 0.599s
Execute: 0.472s
Memory: 4.10Mb
CPU: 0.484s