Int64 that accepts nulls? C# MVC [duplicate]




I have this variable receiveing data from an Excel:


var employeeCedula = Convert.ToInt64(employeeRow[OverheadReportStructure.Employees.Cedula]);


but when I debug the program it shows me the error "Object cannot be cast from DBNull to other types"


How can I change that line to accept nulls?


No comments:

Post a Comment