Class MoneyExtensions

Extension methods for the Money class.

Inheritance
System.Object
MoneyExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Commerce.Marketing.Internal
Assembly: EPiServer.Business.Commerce.dll
Version: 10.8.0
Syntax
public static class MoneyExtensions

Methods

Validate(Money, String)

Validates that the Money does not have a negative value.

Declaration
public static void Validate(this Money money, string validationErrorMessage)
Parameters
Type Name Description
Money money

The money to validate.

System.String validationErrorMessage

The validation error message, that will be used when throwing an exception if the validation fails.

Exceptions
Type Condition
System.ComponentModel.DataAnnotations.ValidationException

If the validation fails.