User839733648 posted
Hi JagjitSingh,
According to your description, I suggest that you could modify your code as below.
(dt.Rows[i]["Name"] != DBNull.Value && string.IsNullOrEmpty(dt.Rows[i]["Name"].ToString()) == false)
dt.Rows[i]["Name"] is not a normal string, so you should use .ToString() to transform it.
Best Regards,
Jenifer