Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
referencesource
Source from the Microsoft .NET Reference Source that represent a subset of the .NET Framework
But if the logic is really complex would you not think of using something like FluentValidation rather then building your own?
For anyone else who is still confused, here's a quick example. You'll notice that the two functions are basically the same, both when passing in a value type and a reference, except one uses the ref keyword. While it is true that the int value that is passed into the method is a value of an integer and that the List is a reference, they have different semantics.
https://github.com/microsoft/referencesource/blob/5697c29004a34d80acdaf5742d7e699022c64ecd/mscorlib/system/array.cs#L50