Santhosh Subramaniam

Santhosh Subramaniam

  • NA
  • 226
  • 108.2k

which one is faster string.Equals() or stringvariable.Equals

Oct 12 2015 1:03 AM
Hi ,
 
   In   string.Equals() is faster or stringVariable.Equals() is faster...?
 
 
Eg :
   string strname=" Test";
    string.Equals(strname, "Test123", StringComparison.OrdinalIgnoreCase))
 
Or
 
strname.Equals("Test123", StringComparison.OrdinalIgnoreCase) 
 
Thanks. 
 

Answers (1)