7. A method for processing code associated with a computer program, comprising: identifying a class declaration in the code that includes a variable and a modifier associated with the variable, the modifier designating that the variable is to be used for determining the identity of an object within the class, and for determining whether the object within the class is equal to another object based on value semantics; and responsive to identifying the class declaration that includes the variable and the modifier associated with the variable: using the variable to determine the identity of the object within the class, and using the variable to determine whether the object within the class is equal to the other object based on value semantics, said using the variable to determine the identity of the object within the class and said using the variable to determine whether the object within the class is equal to the other object based on value semantics comprising automatically overriding an Equals virtual method and a GetHashCode virtual method such that the overridden Equals virtual method and the overridden GetHashCode virtual method are implemented using the variable and satisfy a required contract associated with the virtual methods.
8. The method of claim 7 , further comprising: responsive to identifying the class declaration that includes the variable and the modifier associated with the variable, implementing at least one constraint with respect to the variable.