LoadWithPartialName
Loads an assembly from the application directory or from the global assembly cache using a partial name.
LoadWithPartialName
Loads an assembly from the application directory or from the global assembly cache using a partial name. The assembly is loaded into the domain of the caller using the supplied evidence.
Powershell script:
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') | Out-Null
$computer = [Microsoft.VisualBasic.Interaction]::InputBox("Enter a computer name", "Computer", "$env:computername")
write-output $computer
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
This method first calls Load. If the assembly is not found, this method returns the assembly from the global assembly cache that has the same simple name, and the highest version number.
Urls:
http://blogs.msdn.com/b/suzcook/archive/2003/05/30/57159.aspx
No comments:
Post a Comment