visual studio,why some Method never show in hint list?

兰树豪 381 Reputation points
2023-03-25T03:14:23.25+00:00

It took a long time to find out why the CheckAccess Can't use in my project, The reason is below.

just want to know why? It's so unreasonable

User's image

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,843 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,772 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,109 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,920 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying tests as a means of analysis or diagnosis.
349 questions
{count} votes

Accepted answer
  1. Hui Liu-MSFT 48,531 Reputation points Microsoft Vendor
    2023-03-27T02:53:19.18+00:00

    Hi,@兰树豪 . Welcome Microsoft Q&A.

    As Viorel said, you could refer to more information here.

    You can also read the statement here.

    If you weren't supposed to use the method at all, it wouldn't be public: the intent of that attribute is only to hide the member from mechanisms such as Intellisense and other editor-browsers. You don't typically need to use Dispatcher.CheckAccess() yourself, which is probably why it's marked as non-browsable, but the wisdom of this is something we can only guess at (unless Eric Lippert is watching ;-) In summary: just call Dispatcher. Invoke and don't worry about CheckAccess.


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.