Scripts and using statements

A function may benefit from using statements, provided they are declared in the parent scope. The parent scope includes code run on the console, a script that contains a function, or a module (psm1 file) that contains a function.

Using statements, introduced with PowerShell 5, appear throughout this book. An example of a using statement is shown here:

using assembly System.Xml.Linq
using namespace System.Xml.Linq
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.216.18