VCCodeVariable.StartPointOf - свойство
Returns the start point of the object.
Пространство имен: Microsoft.VisualStudio.VCCodeModel
Сборка: Microsoft.VisualStudio.VCCodeModel (в Microsoft.VisualStudio.VCCodeModel.dll)
Синтаксис
'Декларация
ReadOnly Property StartPointOf ( _
Part As vsCMPart, _
Where As vsCMWhere _
) As TextPoint
'Применение
Dim instance As VCCodeVariable
Dim Part As vsCMPart
Dim Where As vsCMWhere
Dim value As TextPoint
value = instance.StartPointOf(Part, Where)
TextPoint StartPointOf[
vsCMPart Part,
vsCMWhere Where
] { get; }
property TextPoint^ StartPointOf[[InAttribute] vsCMPart Part, [InAttribute] vsCMWhere Where] {
TextPoint^ get ([InAttribute] vsCMPart Part, [InAttribute] vsCMWhere Where);
}
JScript не поддерживает индексированные свойства.
Параметры
Part
Тип: EnvDTE.vsCMPartRequired. A vsCMPart value specifying which part of the definition or the declaration to use (attributes block, body, and so on).
Where
Тип: Microsoft.VisualStudio.VCCodeModel.vsCMWhereOptional. A vsCMWhere value specifying whether the TextPoint object is the definition or the declaration.
Значение свойства
Тип: EnvDTE.TextPoint
A TextPoint object.
Заметки
See How to: Compile Example Code for Visual C++ Code Model Extensibility for information on how to compile and run this sample.
Примеры
This example adds a comment at the beginning of a code element declaration.
Sub AddCommentAtBeginning()
Dim vcElement As VCCodeElement
Dim vcElements As VCCodeElements
Dim textPoint As TextPoint
vcElements = DTE.Solution.Item(1).CodeModel.Classes
vcElement = vcElements.Item(1)
textPoint = vcElement.StartPointOf(vsCMPart.vsCMPartWhole)
textPoint.CreateEditPoint().Insert("/*Comment*/")
End Sub
Разрешения
- Полное доверие для непосредственно вызывающего метода. Этот член не может быть использован частично доверенным кодом. Дополнительные сведения см. в разделе Using Libraries from Partially Trusted Code.