I am accustomed to developing in VB.NET and am starting a new project in C # .net with VS2013. I noticed that in many things there is an expressive difference in syntax and I came across an issue. How do I handle null values of a Datatable, after a query in the Database?
How would I do about the example below?
If (objclidto.DtAniversario Is Nothing) Then : cmd.Parameters.Add(New SqlParameter("@DataAniversario", SqlDbType.Date)).Value = DBNull.Value
Else : cmd.Parameters.Add(New SqlParameter("@DataAniversario", SqlDbType.VarChar)).Value = objclidto.DtAniversario
End If