See this code:
object x = \"mehdi emrani\";
string y = \"mehdi emrani\";
Console.WriteLine(y == x);
that returns true.
Most probably the references are compared (standard Equals implementation for object). In the first example C# optimizes constant strings, and so y and x actually point to the same object, hence their reference is equal. In the other case, y is created dynamically, and so the reference is different.