1

Suppose we a validation code similar to the following:

Rule(account => account.CompanyName).MaxLength(50)

Or

Rule(account => account.Balance).MustBeGreaterThan(0)

Do we still call the numbers 50 or 0 a magic number and define a constant for it, although the functions those are passed in have meaningful name which explains what the number is for?

Kush Grover
  • 363
  • 1
  • 6
  • 16

0 Answers0