Hi all
I need to give download functionality in my application. I am getting list as a parameter in method. My question is how to convert Generic List to bytes? Any help will be appreciated
Code is as follow:-
static byte[] GetAppReportExcel(List<Report.ApplicationReport> listData)
{
byte[] ByteStrings = new byte[listData.Count];
for (int i = 0; i <= listData.Count - 1; i++)
{
ByteStrings[i] = Convert.ToByte(listData[i]);
}
return ByteStrings;
}
I am getting error in above code.