Как проверить, что byte() равен null в условии IIF в VB
I have a column value in Hash format in db and column datatype is varbinary(8000).I convert it into byte array. Problem is some time this column value has null value,now in my code I want to check if column value has null value then return default value of byte array,otherwise return column value using following code
Что я уже пробовал:
<pre> objUser.Password_Hash = IIf(reader("Password_Hash") Is Nothing, {}, reader("Password_Hash"))
System.InvalidCastException: Unable to cast object of type 'System.Byte' to type 'System.Byte[]'.