StructureTag.PrimaryHeaderSpan Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the optional Span of the primary header of the code block represented by this tag.
public virtual Microsoft.VisualStudio.Text.Span? PrimaryHeaderSpan { get; }
member this.PrimaryHeaderSpan : Nullable<Microsoft.VisualStudio.Text.Span>
Public Overridable ReadOnly Property PrimaryHeaderSpan As Nullable(Of Span)
Property Value
Implements
Remarks
For example, in the following snippet of code,
if (condition1)
{
//something;
}
else
{
// something else;
}
PrimaryHeaderSpan of the IStructureTag2 representing "else" statement block would be the same as the HeaderSpan of the IStructureTag representing "if" statement block. This allows structure visualizing features to provide more useful context when visualizing "else" structure blocks.