首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >转到visual studio中VB.net on F12的元数据

转到visual studio中VB.net on F12的元数据
EN

Stack Overflow用户
提问于 2014-09-11 17:16:11
回答 1查看 755关注 0票数 3

在使用C#进行开发时,您可以右键单击一个类,然后单击“转到定义”。如果类是第三方代码(microsoft或其他dll引用),则会出现类元数据。(也可以点击F12)。

在VB.NET中,出现了无用的对象浏览器Windows。不管怎么说,这样的行为会像C#一样吗?我只想让元数据出现。对象浏览器不允许您使用纯文本文件(元数据)进行免费文本搜索。

例如,C#元数据如下(使用IEnumerable):

代码语言:javascript
复制
#region Assembly mscorlib.dll, v4.0.0.0
// C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll
#endregion

using System.Collections;

namespace System.Collections.Generic
{
    // Summary:
    //     Exposes the enumerator, which supports a simple iteration over a collection
    //     of a specified type.
    //
    // Type parameters:
    //   T:
    //     The type of objects to enumerate.This type parameter is covariant. That is,
    //     you can use either the type you specified or any type that is more derived.
    //     For more information about covariance and contravariance, see Covariance
    //     and Contravariance in Generics.
    public interface IEnumerable<out T> : IEnumerable
    {
        // Summary:
        //     Returns an enumerator that iterates through the collection.
        //
        // Returns:
        //     A System.Collections.Generic.IEnumerator<T> that can be used to iterate through
        //     the collection.
        IEnumerator<T> GetEnumerator();
    }
}

在VB.Net中,F12键将打开对象浏览器:

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-09-14 09:04:30

如果第三方代码是用C#编写的,而您的代码是用vb.net编写的,VS无法向您显示定义。这是一个多次报告的bug -似乎“元数据”-function或“转到定义”-function只在纯C#或纯VB.NET项目中工作。

见这篇文章

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25793418

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档