如何在文档注释中引用数组类型

时间:2010-03-02 22:51:16

标签: c# .net visual-studio-2008 documentation comments

I just posted this question并了解了<see cref="">,但是当我尝试

/// This is a set of extensions that allow more operations on a <see cref="byte[]"/>.

编译器给了我关于它没有正确格式化的警告。我需要做什么才能正确看到代码引用?

3 个答案:

答案 0 :(得分:46)

this post所述,请使用

 <see cref="T:byte[]" />

答案 1 :(得分:3)

您可以这样写:

/// <summary>
/// Array byte <see cref="byte"/>[]
/// Nullable byte <see cref="byte"/>?
/// </summary>

/// <summary>
/// Array byte <see cref="T:byte[]"/>
/// Nullable byte <see cref="T:byte?"/>
/// </summary>

答案 2 :(得分:-1)

你应该<summary>...</summary>左右:

/// <summary>
/// This is a set of extensions that allow more operations on a <see cref="byte[]"/>.
/// </summary>