I am trying to convert a type array to a string. I have done my research and nothing seems to be working for me. Here is my code,
if (row.Table.Columns.Contains("DataRow") && !Convert.IsDBNull(row["DataRow"]))
{
byte[] rowData;
if(Byte.TryParse(row["DataRow"].ToString(), out rowData)
{
dbModel.DataRow= rowData;
}
else
{
return null;
}
I am trying to initialize and assign the array to the "host" and hold the value throughout the if statement. DataRow holds varBinary(128), the arguments in the second if statement give out an error that reads "The best overloaded method match for 'byte.TryParse(string, out byte)' has some invalid arguments