Open dswisher opened 8 years ago
+1
In thinking about this a little more, I'm wondering if it would be better to use a new attribute, perhaps [Mandatory]
, to avoid conflicts.
Agreed. Another reason is that any external/reused attributes effectively hides the functionality from developer discovery via intellisense.
To mark a positional parameter as required, the
[Required]
attribute fromSystem.ComponentModel.DataAnnotations
is used. In a new project, this is not included by default. To reduce dependencies, consider adding a[Required]
attribute toYaclops.Attributes
.