46

I just posted this question and learned about <see cref="">, however when i tried

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

The compiler gave me warnings about it not being formatted correctly. What do I need to do so it will see the code reference correctly?

Community
  • 1
  • 1
Scott Chamberlain
  • 124,994
  • 33
  • 282
  • 431
  • I don't think this is an objection to [] per se, more about the compiler not being able to recognise `byte[]` as a linkable type. I've changed the title of your question to reflect this: please roll back if you disagree or think I'm wrong. – itowlson Mar 02 '10 at 22:56

3 Answers3

63

As described in this post, use

 <see cref="T:byte[]" />
Community
  • 1
  • 1
Timores
  • 14,439
  • 3
  • 46
  • 46
  • 4
    I was trying to do this with `T:string[]`, and it wasn't working. `Array.string` seemed to work. – zzzzBov Jun 14 '13 at 15:24
4

You can write like this:

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

or

/// <summary>
/// Array byte <see cref="T:byte[]"/>
/// Nullable byte <see cref="T:byte?"/>
/// </summary>
Mr.Scazy
  • 41
  • 1
-2

You should perhaps have <summary>...</summary> around:

/// <summary>
/// This is a set of extensions that allow more operations on a <see cref="byte[]"/>.
/// </summary>
Vlad
  • 35,022
  • 6
  • 77
  • 199