How does .NET compiler compare two strings?

Posted by Pankaj on Stack Overflow See other posts from Stack Overflow or by Pankaj
Published on 2010-04-12T09:55:11Z Indexed on 2010/04/12 10:23 UTC
Read the original article Hit count: 290

Filed under:
|
string a="I am comparing 2 string";
string b="I am comparing 2 string";

if(a==b)
  return true;
else
  return false;

How does a .NET compiler compare two strings? Does a string work like a struct(int)? string is class so a=b means we are comparing 2 object, but i want to compare 2 values.

© Stack Overflow or respective owner

Related posts about string-compare

Related posts about c#