2010-03-02 60 views
27

I just posted this question和了解<see cref="">,但是當我試圖如何引用數組類型的文檔註釋

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

編譯器給我的警告,它沒有被正確格式化。我需要做什麼,它會正確地看到代碼引用?

+0

我不認爲這是對[]本身的反對,更多的是關於編譯器不能識別byte []作爲可鏈接類型。我已經改變了你的問題的標題,以反映這一點:如果你不同意或認爲我錯了,請回滾。 – itowlson 2010-03-02 22:56:09

回答

34

this post描述,使用

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

我試圖用'T:string []'來做到這一點,它不工作。 'Array.string'似乎工作。 – zzzzBov 2013-06-14 15:24:12

-1

你或許應該有<summary>...</summary>各地:

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

我做過了,但是我從示例中刪除了它,因爲我不想輸入3行。 – 2010-03-02 23:43:01

2

你可以這樣寫:

/// <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>