Skip to content

Instantly share code, notes, and snippets.

@mnzk
Created November 11, 2013 12:42
Show Gist options
  • Save mnzk/7412627 to your computer and use it in GitHub Desktop.
Save mnzk/7412627 to your computer and use it in GitHub Desktop.
function Join-Namespace {
($args | %{$_})-join "."
}
function Invoke-Apply {
$func, $arg = $args
Invoke-Expression "$func $arg"
}
Set-Alias ns Join-Namespace
Set-Alias apply Invoke-Apply
$d = ns System Data
$table = apply New-Object (ns $d DataTable)
Write-Host $table.GetType().FullName
#=> System.Data.DataTable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment