c# - Parse Byte[] to File without saving it -
i querying web service (external system) returns me byte[]. byte[] csv file, saving byte[] temp location csv , parsing csv file database.
is possible straight read byte[] , instead of saving file temp location, store in memory , parse file contents database?
i looked @ opening byte[] file without saving file first not sure if things have changed now? inputs appreciated.
not easy find there csv parser in standard.
public void handlemycontent(byte[] content) { using (var stream = new system.io.memorystream(content)) { using (var reader = new streamreader(stream)) { using (var parser = new microsoft.visualbasic.fileio.textfieldparser(reader)) { //parse csv here } } } }
c# .net
No comments:
Post a Comment