如何从程序集中获取所有信息?

发布于 2024-12-16 15:02:15 字数 174 浏览 1 评论 0 原文

我正在 C# 创建智能感知作为 Java 的智能感知。我有 TextBox,用户可以编写他想要获取的内容。如何从程序集中获取所有信息,因为它是类、常量、命名空间、基元、枚举或方法。 .?就像图片中的

like this

I am creating intellisense as Java's intellisense at C#.I have TextBox which user can write what he wants to get.how to get all information from assembly as it is class,or const,or namespace,or primitive,or enum,or method ..? like in the picture

like this

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

背叛残局 2024-12-23 15:02:15

不太清楚你的意思,但你应该从:

如果您确实选择Type.GetMembers,则可以使用MemberInfo.MemberType

基本上查看 TypeMethodInfo 等上可用的所有成员...如果您有任何更多特定问题,我们可能会更详细对那些有帮助。

It's not really clear what you mean, but you should start with:

If you do go for Type.GetMembers, you can distinguish between them using MemberInfo.MemberType.

Basically look at all the members available on Type, MethodInfo etc... and if you have any more specific questions, we can probably be more helpful with those.

凝望流年 2024-12-23 15:02:15

在 C# 中,您可以使用 System.Reflection.Assemly 类/方法来执行此操作。

In C# you can use System.Reflection.Assemly class/methods to do that.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文