string.IsNullOrEmpty returns true when supplied string is not null

后端 未结 3 996
日久生厌
日久生厌 2021-01-12 18:05

I have a unit test that calls a method on an object passing in a string.

One of the first things that the method being called does is to check the string for null or

3条回答
  •  无人共我
    2021-01-12 18:42

    This is the first time I have come across this issue.

    The way we stepped round it for now is to add the following on the back of the IF statement.

    #if DEBUG
                else
                {
                    // A hack to fix the debugger issue on the IsNullOrEmpty statement above.
                }
    #endif
    

提交回复
热议问题