Я пытаюсь создать комментарии XML для IntelliSense и использовать для этого следующее:
'''<summary>Units
''' <para>MinOccurs: '0'</para>
''' </summary>
Public Property S_Units As String = Nothing
В разобранном виде это выглядит так:
'''<summary>BinLocation
Public Property B_BinLocation As String = Nothing
Что я пытаюсь сделать, так это добавить XML-комментарий, и когда он свернут, он имитирует способ его отображения при детализации системного свойства, такого как свойство Microsoft String.Padright
ниже (я знаю, что это просто обычные комментарии, но требуется тот же эффект)
'
' Summary:
' Returns a new string that left-aligns the characters in this string by padding
' them on the right with a specified Unicode character, for a specified total length.
'
' Parameters:
' totalWidth:
' The number of characters in the resulting string, equal to the number of original
' characters plus any additional padding characters.
'
' paddingChar:
' A Unicode padding character.
'
' Returns:
' A new string that is equivalent to this instance, but left-aligned and padded
' on the right with as many paddingChar characters as needed to create a length
' of totalWidth. However, if totalWidth is less than the length of this instance,
' the method returns a reference to the existing instance. If totalWidth is equal
' to the length of this instance, the method returns a new string that is identical
' to this instance.
'
' Exceptions:
' T:System.ArgumentOutOfRangeException:
' totalWidth is less than zero.
Public Function PadRight(totalWidth As Integer, paddingChar As Char) As [String]
В разобранном виде это выглядит так:
...Public Function PadRight(totalWidth As Integer) As [String]
Обратите внимание на эллипс в соответствии с объявлением функции. Если я моделирую структуру, используемую здесь, я получаю следующее:
'
' Summary:
' Summary Line
'
' Returns:
' Returns Line
Public Property S_Units As String = Nothing
В результате свернуто:
' ...
Public Property S_Units As String = Nothing
Обратите внимание на эллипс над объявлением свойства. 1 примечательный момент: я получаю образец строки из пространства имен System
, а на вкладке VS отображается String [from metadata]
Может быть, поэтому он отображается по-другому, или я где-то пропустил какой-то импорт или ссылку?
Что-нибудь, что я могу попробовать?
PadRight
? Это исходный код или это декомпилированная сборка? - person jmcilhinney   schedule 16.05.2018String
. В контексте выберите Перейти к определению (F12).PadRight
является одной из заявленных функций. Как уже упоминалось, это открывает пространство имен системы из dll. метаданные (вероятно, декомпилированные моей системой). - person Steven de Beer   schedule 16.05.2018