SyntaxFix
Write A Post
Hire A Developer
Questions
I was having 2 values which could contain null values.
while(dr.Read()) { Id = dr["Id"] as int? ?? default(int?); Alt = dr["Alt"].ToString() as string ?? default(string); Name = dr["Name"].ToString() }
resolved the issue