I'm kinda new in powershell (expected start of message :)). I wasn't been able to find answer on my question here or somewhere else, so could somebody help me, please?
For example, we want to use some enum declared in .NET libraries. How we use it in .NET? Kind of like:
using System.Data.SqlClient;
public class Test {
var x = SortOrder.Ascending;
}
If I need to use it in powershell, as I understood I need to write something like:
$x = [System.Data.SqlClient.SortOrder]::Ascending
So, the question is, is it possible in powershell to use something like 'using' as in C# to shorten the syntax to kind of like: $sortOrder.Ascending or [SortOrder]::Ascending?