I have a method that sets a variable to null when declared, but am getting a security error stating that the method can dereference a null pointer, thereby raising a NullException. By declaring the variable a string.Empty would that eliminate the NullException?
Null Exception
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Dec 15, 2014, 9:20 AM EST
It depends whether an empty string is a valid value for whatever it is you're setting.
Marc176 reputationPosted Dec 15, 2014, 9:28 AM EST