Specifies that a field can be used in method contracts when the field has less visibility than the method.
See Also: ContractPublicPropertyNameAttribute Members
When you apply the System.Diagnostics.Contracts.ContractPublicPropertyNameAttribute attribute to a field, that field can be used in the code contracts for a method when the field has less visibility than the method. There must be a visible property that is equivalent to the value of the field. For example, you can use this attribute if the method is public, but the field is private.