I have found in my codebase lots of places has been coded as
dr["FIRST_ITEM"].Trim()
Now the problem is that if FIRST_ITEM
column is a allow null values there is chance to encounter Null pointer Exception. I know, I can change the code to
Convert.ToString(dr["FIRST_ITEM"]).Trim()
in order to fix the problem. But then I have to do this in 1000 lines of code. Can I have solution, by which I can fix the problem with least effort?