It's unfortunate that I'm forced to disable warnings using pragma when utilizing the GreaterThanAttribute with properties of type decimal or similar. For example:
[GreaterThan(0)]
public required decimal Amount { get; set; }
This results in the following warning:
Warning IV0015: Property/parameter `operand` is marked `[TargetType]`, but value is not of type `decimal`
Having a way to relax the constraints of [TargetType] or an option to toggle a strict mode would significantly improve this experience. Because this becomes unbearable if your project is treating warnings as errors.
It's unfortunate that I'm forced to disable warnings using
pragmawhen utilizing theGreaterThanAttributewith properties of type decimal or similar. For example:This results in the following warning:
Having a way to relax the constraints of
[TargetType]or an option to toggle a strict mode would significantly improve this experience. Because this becomes unbearable if your project is treating warnings as errors.