c# - How to convert an object to a 2 dimension branched string array -


i have 2 dimension branched array. converted object , write via serializer file. (the conversion object cause of serializer, u know) read file , have object - how able convert object 2d-branched array?

thanks in advance!

edit:

// read object serializedobjectread sr = new serializedobjectread(); sr.filestreamname = @"e:\log\test.bin"; int intsuccesfullr = sr.reader(); object = new object(); if (intsuccesfullr == 0) { = sr.readobj; }  // here want convert object 2d array   // reader class public class serializedobjectread { public string filestreamname; public object readobj;  public int reader() { int intsuccesfull = 0; try { iformatter formatter = new binaryformatter(); stream stream = new filestream(filestreamname, filemode.open, fileaccess.read, fileshare.read); readobj = formatter.deserialize(stream); stream.close(); } catch { intsuccesfull = -1; }  return intsuccesfull; } } 

you can cast objects desired type.

object b; example[,] r = (example[,])b; 

Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -