how to check datatable is empty
In think, you are using dtUserSettingvalues before
initialization and dtUserSettingvalues does not
have any reference to DataTabe object so that is why you are getting this
error, if there is such case in your code then you can do this check in this
way
if
((dtUserSettingvalues != null) &&
(dtUserSettingvalues.Rows.Count != 0))
{
//do your code
}
No comments :
Post a Comment