CompareAttribute Constructor

.NET Framework 4.6 and 4.5

Initializes a new instance of the CompareAttribute class.

Namespace:  System.ComponentModel.DataAnnotations
Assemblies:   System.ComponentModel.DataAnnotations (in System.ComponentModel.DataAnnotations.dll)
  System.ComponentModel.Annotations (in System.ComponentModel.Annotations.dll)

public CompareAttribute(
	string otherProperty
)

Parameters

otherProperty
Type: System.String

The property to compare with the current property.

.NET Framework

Supported in: 4.6, 4.5
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft