Referencing an array type with cref

Topics: User Forum
Nov 27, 2014 at 8:25 AM
When I reference an array like in this example code, I get the following error:

Unknown reference link target 'T:Byte[]'.

How do you reference array's in a way that Sandcastle likes?
/// <summary>
/// Writes a <see cref="T:Byte[]"/> value.
/// </summary>
/// <param name="value">The <see cref="T:Byte[]"/> value to write.</param>
public virtual void WriteValue(byte[] value)
{
    if (value == null)
        WriteNull();
    else
        InternalWriteValue(JsonToken.Bytes);
}
Coordinator
Nov 27, 2014 at 5:03 PM
Edited Nov 27, 2014 at 5:04 PM
Arrays are general in nature and there are no help topics for specific types of arrays similar to how you must link to List<T> rather than a specific type like List<String> for generics. Typically you create a link to the array type and put the brackets outside of it or follow it with the word "array". For example:
/// Writes a <see cref="Byte"/> array value.
//  Writes a <see cref="Byte"/>[] value.
Eric
Nov 27, 2014 at 8:11 PM
That makes sense. Thanks.