-
Couldn't load subscription status.
- Fork 53
Comment
Line comments are comments that start with the hash-character (#) and ends with a line-break (EOL).
# This is a line comment
Write-Host 'Hello World!' #This is also a line comment!The following scopes are assigned to line comments:
- punctuation.definition.comment
- comment.line
The hash-character is given the punctuation.definition.comment scope, while the comment itself are given the comment.line scope.
Block comments start with <# and ends with #>. Everything between these two markers are considered a comment.
<#
This is a block comment.
#>The following scopes are assigned to block comments:
- punctuation.definition.comment
- comment.block
<# and #> are assigned the punctuation.definition.comment scope, and everything inbetween is given the comment.block scope.
Within any comment scope, syntax highlighting rules exist for PowerShell comment-based help.
Use
- Prerequisites
- Workflow
- Tests
- Comment
- String
- Numeric constant
- Type
- Function
- Command (Cmdlet)
- Class
- Enum
- Switch
- Array
- Hashtable
- Subexpression
- Control
- Variable
- Operator