advert.AC = String.IsNullOrEmpty(reader["AC"].ToString()) ? null : Byte.Parse(reader["AC"].ToString());
I want to assign null to the property named AC when there is null record in reader["AC"] otherwise assign the value to AC by parsing it into Byte. The type of AC is "Byte?" in my case but it is giving an error in the above assignment.
Type of conditional expression cannot be determined because there is no implicit conversion between '' and 'byte' C:\Users\Waheed Ahmed\documents\visual studio 2010\Projects\Autos\Autos\Controllers\autosController.cs 274 85 Autos