I noticed this interesting use of the "this" keyword while viewing the disassembled code of Int32.GetHashCode() in .NET Reflector:
public override int GetHashCode()
{
return this;
}
I always thought "this" is only used with reference types not value types. In the code above, will boxing be used every time you try to get the hash code of an int?
From the documentation of the "this" keyword in MSDN: - The this keyword refers to the current instance of the class
Regards