Why do ValidationAttributes still have RequiresValidationContext property, when it's not being used? #43941
Answered
by
huoyaoyuan
kikaragyozov
asked this question in
Q&A
-
I couldn't find where that property is ever used in the .NET Core codebase, or ASP.NET Core. In .NET Framework it's being used only in here. |
Beta Was this translation helpful? Give feedback.
Answered by
huoyaoyuan
Nov 3, 2020
Replies: 1 comment 1 reply
-
It should be purely for compatibility, because we cannot remove public api, or user code may issue with |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
kikaragyozov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It should be purely for compatibility, because we cannot remove public api, or user code may issue with
TypeLoadException
orMissingMemberException
.Having an extra virtual property gives very little harm to the runtime.