User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
 

Today, I was experimenting with hash tables that had keys with multiple values. (More about that later!) But, in the course of my experimentation, I tried one technique and then another and then another. I didn’t want to delete any of my trial code, but I also didn’t want it to run. I just wanted to comment it out.

I could have typed a comment symbol (#) on each line or typed the “<#” and “#>” to enclose each code block in a comment block, but PowerShell Studio makes commenting even easier.

 

To comment out each line individually (#), highlight one or more lines and type Ctrl + Q, or click Comment (in the Edit section of the Home tab).

Comment (Ctrl+Q)

Here’s the result.

commented lines

 

 

To add a comment block, highlight a code block and type Ctrl + Shift + Alt + Q, or click Block Comment. (The Block Comment icon was new in PowerShell Studio version 4.1.72.)

Block Comment (Ctrl + Shift + Alt + Q)

And, here’s the result.

Commented code block

 

To delete comments (either format), highlight the commented lines and type Ctrl + Shift + Q, or click Uncomment.

Uncomment (Ctrl + Shift + Q)

 

And, they’re gone.

Uncommented code

 

That will save me a few keystrokes and let me concentrate on my hash table.

June Blender is a technology evangelist at SAPIEN Technologies, Inc. You can reach her at This email address is being protected from spambots. You need JavaScript enabled to view it. or follow her on Twitter at @juneb_get_help.

If you have questions about our products, please post in our support forum.
For licensed customers, use the forum associated with your product in our Product Support Forums for Registered Customers.
For users of trial versions, please post in our Trial Software Questions forum.
Copyright © 2017 SAPIEN Technologies, Inc.