Why the quick watch shows the statement p == "" as false, but we are going in the if statement.
static void Main(string[] args)
{
string q = "";
A(q);
}
static void A (object p)
{
if(p == null || p =="")
{
Console.WriteLine("Debugger shows false");
}
}
Is it a bug ?
Note that according to Compare string and object in c# p == ""
should still evaluate to true
as ""
is an interned string - which indeed happens when code is executed, but fails in quick watch.