IT Questions and Answers :)

Wednesday, December 9, 2020

In Windows PowerShell, which of the following is a way you can load WPF for the creation of GUI interfaces in your scripts?

In Windows PowerShell, which of the following is a way you can load WPF for the creation of GUI interfaces in your scripts?

  • [reflection.assembly]::loadwithpartialname("System.Windows.Forms")
  • Add-Assembly -AssemblyName System.Windows.Forms
  • New-Object -TypeName System.Reflection.Assembly(System.Windows.Forms)
  • New-Assembly -AssemblyName "WPF" 

In Windows PowerShell, which of the following is a way you can load WPF for the creation of GUI interfaces in your scripts?

 EXPLANATION

You would call the System.Reflection.Assembly object, then load the WPF assembly, "System.Windows.Forms" with the method LoadWithPartialName. This allows you to then add objects from the System.Windows.Forms assembly, like Form or Button.

SOURCE

https://msdn.microsoft.com/en-us/library/system.reflection.assembly.loadwithpartialname(v=vs.110).aspx

 

Share:

0 comments:

Post a Comment

Popular Posts