Selected TableLayoutSettings properties throw InvalidEnumArgumentException
Selected TableLayoutSettings properties now throw an InvalidEnumArgumentException if you attempt to assign an incorrect value.
Change description
In previous .NET versions, these properties throw an ArgumentOutOfRangeException if you attempt to assign an incorrect value. Starting in .NET 6, these properties throw an InvalidEnumArgumentException in such cases.
Change category
This change affects binary compatibility.
Reason for change
Throwing InvalidEnumArgumentException is in line with the existing Windows Forms API in similar situations. Throwing this exception also provides developers with a better debug experience.
Version introduced
.NET 6
Recommended action
- Update the code to prevent assigning incorrect values.
- If necessary, handle an InvalidEnumArgumentException when accessing these APIs.
Affected APIs
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for