1

每当我对我创建的结构进行修改时,我都必须在更改发生之前退出会话。有没有更好的方法来做到这一点?

Add-Type @"
  public struct Computer {
  public string Name;
  public string ProductName;
  public string InstallDate;
  public string LastBootTime;
  public string ServicePack;
  public string ProductVersion;
  public string OSArchitecture;
  public string Manufacturer;
  public string Model;
  public string Memory;
}
"@
4

1 回答 1

2

这是一个 .NET 限制。就我所知,appDomain无法卸载加载的组件。这就是为什么您必须关闭 powershell 控制台并重新启动 nes 会话的原因。

于 2012-10-15T11:52:56.240 回答