PostSharp 6.9 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Contracts Namespace / Regular­Expression­Attribute Class / Regular­Expression­Attribute Methods / Regular­Expression­Attribute.​Get­Error­Message Method

RegularExpressionAttribute.GetErrorMessage Method

Note: This API is now obsolete.

Gets unformatted error message as defined by the instance.

Namespace:  PostSharp.Patterns.Contracts
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.9.1.0 (6.9.1.0)
Syntax
C#
[ObsoleteAttribute("Use ContractExceptionFactory and ContractLocalizedTextProvider to generate error messages.")]
protected override string GetErrorMessage()

Return Value

Type: String
Remarks

See remarks on LocationContractAttribute for information about message parameters.

Use of this method can be overridden by setting ErrorMessage property to non-null value.

See Also