Empty String

What is Outcome and why?

var str = string.Empty;      
switch (str)         
{            
case string.Empty:                
Console.WriteLine(“Empty 1”);               
break;      
    
case “”:                
Console.WriteLine(“Empty 2”);                
break;    
     
default:              
Console.WriteLine(“default”);                     
}

One Reply to “Empty String”

Leave a Reply

Your email address will not be published. Required fields are marked *