I have a string property that has a maximum length requirement because the data is linked to a database. What exception should I throw if the caller tries to set a string ex
You may use InvalidOperationException. That's a compromise. I wouldn't bother using an ArgumentException either.