System.ComponentModel.DataAnnotations.EqualToAttribute.FormatErrorMessage C# (CSharp) Метод

FormatErrorMessage() публичный Метод

Applies formatting to an error message, based on the data field where the error occurred.
public FormatErrorMessage ( string name ) : string
name string The name to include in the formatted message.
Результат string
        public override string FormatErrorMessage(string name)
        {
            var otherPropertyDisplayName = OtherPropertyDisplayName ?? OtherProperty;
            return CultureInfo.CurrentCulture.Format(this.ErrorMessage, name, otherPropertyDisplayName);
        }