description | title | ms.date | f1_keywords | helpviewer_keywords | ||
---|---|---|---|---|---|---|
Learn more about: Compiler Error C2031 |
Compiler Error C2031 |
08/18/2022 |
|
|
a virtual destructor with 'accessibility' accessibility is not allowed for this type
a virtual destructor must have 'public' accessibility
A virtual Windows Runtime class has an access specifier or sealed
specifier that's not allowed for a virtual destructor. For more information, see Ref classes and structs.
To fix this error, change the accessibility of the destructor.