Pregunta

¿Hay alguna forma de especificar qué lenguaje se está utilizando en el <code> Etiqueta utilizada dentro de un <example> etiqueta en comentarios XML?

Estoy usando Sandcastle Help File Builder para probar la documentación de construcción de mis comentarios XML, pero cuando incluyo muestras de código VB.NET en mis secciones de ejemplo, las muestra como "C#", no VB.NET. No estoy seguro si hay algo más que necesito hacer ...

Aquí están los comentarios de XML que estoy tratando de hacer.

        /// <summary>
        /// Creates and sends an email.
        /// </summary>
        /// <param name="subject">A <c>String</c> that contains the subject text.</param>
        /// <param name="emailBody">A <c>String</c> that contains the message body.</param>
        /// <param name="emailFrom">A <c>String</c> that contains the address of the sender of the e-mail message.</param>
        /// <param name="emailTo">A <c>String</c> that contains the addresses of the recipients of the e-mail messa</param>
        /// <param name="emailBCC">The email address to blind carbon-copy the email to.</param>
        /// <param name="IsHtml">if set to <c>true</c> [the body of the email HTML].</param>
        /// <param name="attachment">The <c>System.Net.Mail.Attachment</c> to the email.</param>
        /// <exception cref="ArgumentNullException"><c>emailFrom</c> is null or <c>emailTo</c> is null.</exception>
        /// <exception cref="ArgumentException"><c>emailFrom</c> is <c>Empty</c> ("") or <c>emailTo</c> is <c>Empty</c> ("").</exception>
        /// <example>
        /// <code>
        /// string subject = "This is my subject.";
        /// string[] emailBody = new {"body line 1", "body line 2"};
        /// string emailFrom = "test@test.com";
        /// string emailTo = "recipient@test.com";
        /// string emailBCC = string.empty;
        /// bool isHTML = false;
        /// 
        /// EmailWithComments.SendEmail(subject, emailBody, emailFrom, emailTo, emailBCC, isHTML, null);
        /// </code>
        /// <code>
        /// Dim subject As String = "This is my subject."
        /// Dim emailBody As String() = New From { _
        ///     "body line 1", _
        ///     "body line 2" _
        /// }
        /// Dim emailFrom As String = "test@test.com"
        /// Dim emailTo As String = "recipient@test.com"
        /// Dim emailBCC As String = String.empty
        /// Dim isHTML As Boolean = False
        ///
        /// EmailWithComments.SendEmail(subject, emailBody, emailFrom, emailTo, emailBCC, isHTML, Nothing)
        /// </code>
        /// </example>

No hay solución correcta

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top