c# - How to serialize dataRow to xml and get bytes array? -


how serialize single datarow xml , byte array? best way serialize data row xml? should create class, set value datarow class object , serialize bytes? better way?

try following :

        static void main(string[] args)         {             datatable dt = new datatable();              memorystream stream = new memorystream();              dt.writexml(stream);              stream.position = 0;              byte[] bytes = new byte[stream.length];             stream.read(bytes, 0, (int)stream.length);           } 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -