i want to add items to arraylist object inside the class. how to do it. below is powershell code. it doesnt allow. how to achive this with 1. array declared at global level 2. array declared at class level
$logArrayGlobal = [System.Collections.ArrayList]::new()
class LogManager {
$logArrayClass = [System.Collections.ArrayList]::new()
LogManager()
{
$logArrayGlobal.Add("sada")
$this.logArrayClass
}
}
$logArrayGlobal.Add("sada")to$global:logArrayGlobal.Add("sada")