Επεξεργασία

Κοινή χρήση μέσω


WFDEV002 obsoletion is now an error

The WFDEV002 obsoletion has been promoted from a warning to an error in .NET 8. Any reference to DomainUpDown.DomainUpDownAccessibleObject will result in a compilation error that can't be suppressed. In addition, DomainUpDown.CreateAccessibilityInstance() now returns an object of the internal type UpDownBase.UpDownBaseAccessibleObject.

Version introduced

.NET 8 Preview 1

Previous behavior

Previously, if you referenced the DomainUpDown.DomainUpDownAccessibleObject type, you got compile-time warning WFDEV002.

Also, DomainUpDown.CreateAccessibilityInstance() returned an object of type DomainUpDown.DomainUpDownAccessibleObject.

New behavior

If you reference the DomainUpDown.DomainUpDownAccessibleObject type, you'll get a compile-time error with the same diagnostic ID (WFDEV002).

In addition, since the type has been removed, DomainUpDown.CreateAccessibilityInstance() now returns an object of type UpDownBase.UpDownBaseAccessibleObject (which is an internal type).

Change category

This change can affect source compatibility.

Reason for change

The DomainUpDown.DomainUpDownAccessibleObject class has always been documented as "internal use only". All functionality of the class was moved to the base class.

Update your code to use System.Windows.Forms.Control.ControlAccessibleObject or AccessibleObject instead of DomainUpDown.DomainUpDownAccessibleObject.

Affected APIs