File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Paragraphs/Get-heading-list-value/.NET/Get-heading-list-value Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -23,13 +23,11 @@ static void Main(string[] args)
2323 Console . WriteLine ( "No paragraphs with the style 'Heading 3' found." ) ;
2424 else
2525 {
26- foreach ( Entity paragraph in headingParagraphs )
27- {
28- //Get the string that represents the appearance of list value of the paragraph.
29- if ( paragraph is WParagraph )
30- Console . WriteLine ( ( paragraph as WParagraph ) . ListString ) ;
31- else
32- Console . WriteLine ( "The entity is not a WParagraph." ) ;
26+ foreach ( Entity entity in headingParagraphs )
27+ {
28+ WParagraph paragraph = entity as WParagraph ;
29+ //Get the the heading number and the heading text together.
30+ Console . WriteLine ( paragraph . ListString + paragraph . Text ) ;
3331 }
3432 }
3533 //Pauses the console to display the output.
You can’t perform that action at this time.
0 commit comments