Powershell throw

throw

You Can use ‘throw’ key to respond to a condition or in the Catch block of a
Try-Catch-Finally statement. You can also use the Throw keyword in a
parameter declaration to make a function parameter mandatory.

 

Image result for throw

we use the ‘throw’ for a variable we want it to be filled with required data ,for example i would like the Parameters on my function will be declared by the user  –

Example 2 –

(Visited 162 times, 1 visits today)

Leave a Reply