I have a datatable customerTbl and I step through the rows
foreach (DataRow row in customerTbl.Rows)
{
string CustomerID = row["Customer ID"].ToString();
}
However, the column Customer ID returns byte[]. How can I convert this to a string (CustomerID)?
I tried something like
string CustomerID = Convert.ToBase64String(row["Customer ID"]);
but it obviously doesn't work
Thanks in advance
CustomerIdabyte[]in the first place?Convert.ToBase64String, does as it says on the package: it converts to a base64 string. Why do you want to see a string? What for?