Click here to Skip to main content
15,877,168 members

Comments by Mahdi_kishislan (Top 2 by date)

Mahdi_kishislan 17-Apr-14 2:32am View    
tnx
Mahdi_kishislan 15-Apr-14 3:01am View    
file content is byte array variable (byte[]) that contain my binary data.
this is my method that convert data from sql to bye[] in c#
public static byte[] ObjectToByteArray(Object obj)
{
if (obj == null)
return null;
BinaryFormatter bf = new BinaryFormatter();
MemoryStream ms = new MemoryStream();
bf.Serialize(ms, obj);
return ms.ToArray();
}