Pages

Monday, March 7, 2011

Difference between == and .Equals() in .Net

Difference between == and .Equals() in .Net
 = = compare valus of variables
.Equals() compare Objects  of variable

int x=10, double y=10
e.g
if(x==y)--true
if(x.equals(y)) false

No comments: