且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SandCastle:如何cref到String.Format(string,params object [])?

更新时间:2023-11-05 13:22:40

PS我知道在String.Format的情况下,我可以使用href链接到MSDN Library页面。
但是我如何链接到我的功能?

我不知道,MSDN库本身似乎有问题用params链接到String.Format重载:
请参阅http://msdn.microsoft.com/en-us /library/system.string.format(VS.100).aspx

所以我想知道这是否是SandCastle中的一个错误?


Hi,

in the XML doc comments for the following function, I try to link to String.Format (string, params object []), but the link doesn't work.

namespace Util {
  public static class XTrace {
    public void WriteLine (string fmt, params object[] args) {
      Trace.WriteLine (String.Format (fmt, args));
    }
  }
}

In the generated doc.xml I see my functions member name is
  "M:Util.XTrace.WriteLine(System.String,System.Object[])",
so I assume the link to String.Format should be
  <see cref="M:System.String.Format(System.String,System.Object[])"/>,
but that doesnt work. Instead I get the following warning:
  Warn: CachedResolveReferenceLinksComponent: Unknown reference link target 'M:System.String.Format(System.String,System.Object[])'.

Any idea what I am doing wrong ?
Do I need to add something special because of the "params" modifier ?

I am using SandCastle May 08 with SandCastle HelpFileBuilder 1.8.0.2.

Martin

P.S. I know that in the case of String.Format, I could simply link to the MSDN Library page using href.
But how would I link to my function ?

I noctice, that the MSDN library itself seems to have a problem to link to the String.Format overloads with params:
See http://msdn.microsoft.com/en-us/library/system.string.format(VS.100).aspx

So I wonder if this is a bug in SandCastle ?