Explanation Box 1: Box 2: Box 3: In Box 3 we must use Name.Equals, not Object.Equals, to properly compare two strings. Incorrect: Not Box 3: Object.Equals (obj, obj) compares the REFERENCE (true if they point to same object). Two strings, even having the same value will never have the same reference. So it is not applicable here.