Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.