ذخیره کردن هر نوع فایلی در متغیر byte
byte[] fd;
OpenFileDialog o = new OpenFileDialog();
if (o.ShowDialog() != DialogResult.Cancel)
{
filename = o.FileName;
FileStream st = new FileStream(filename, FileMode.Open, FileAccess.Read);
FileInfo fi = new FileInfo(filename);
fd = new byte[fi.Length];
st.Read(fd, 0, (int)fi.Length);
st.Close();
}
+ نوشته شده در شنبه بیست و دوم شهریور ۱۳۹۹ ساعت 14:0 توسط محسن
|