This article is a mirror article of machine translation, please click here to jump to the original article.

View: 9673|Reply: 0

PowerShell methods for single-line comments, multi-line comments, and block comments

[Copy link]
Posted on 1/17/2017 4:20:23 PM | | |
PowerShell's commenters are divided into line and block comments. The line annotator uses the hashtag (#) to cause a line; Block annotators use "<#" and "#>" to elicit a paragraph of comment.
Line annotation symbols
For example:


block annotators, multi-line annotations
For example:


This is a paragraph about the purpose and description of the script that the editor will define before writing a script. It appears in the form of annotations, and it is recommended that you do the same, so that you can know the function, source, version, etc. of the script in the future.
Comments about C#
While PowerShell scripts follow C#'s syntax rules in large numbers, C#'s comments cannot be used in PowerShell.
For example:


Regarding the use of PowerShell annotators, the editor will introduce so much, I hope it will be helpful to everyone, thank you!





Previous:WebSocket Signalr Communication Authentication [Source Code]
Next:PowerShell calls .net and subscribes to events [source code]
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com