1

我在评论(XML 风格)Visual C++/CLI 通用函数时发现了两个问题。类型化函数的行为符合预期。

系统配置为 Windows 7 和 Visual Studio Premium 2013。该项目是 C++/CLI 项目并输出 DLL。

描述

如果我将函数声明“拆分”成两行,注释将不再显示。不在同一个 C++/CLI 项目中,也不在使用它的 C# 项目中,Visual Studios 的对象浏览器也不显示任何内容:

/// <summary>
/// Does something with <paramref name="col"/>.
/// </summary>
/// <remarks>VS does not like me :-(</remarks>
/// <typeparam name="T">Types allowed derive from class <see cref="CClassA"/>. These (actually) are ...</typeparam>
/// <param name="col">Collection to do something with.</param>
generic<class T> where T : CClassA
    static void DoSomething(IEnumerable<T>^ col);

如果整个声明排成一行,则注释只会出现在同一个 C++/CLI 项目中:

/// SAME COMMENT AS ABOVE
generic<class T> where T : CClassA static void DoSomething(IEnumerable<T>^ col);

问题:

有谁知道,如何使用通用函数重写评论以显示在项目中?

4

0 回答 0