The topic currently only mentions script-block-based ETS members and PowerShell classes.
A quick demonstration:
Add-Type -AssemblyName System.Windows.Forms
$form = New-Object System.Windows.Forms.Form
$timer = new-object System.Windows.Forms.Timer
$timer.Add_Tick( {
param([object] $sender, [eventargs] $evArgs)
Write-Verbose -Verbose ('$this equals $sender? ' + [object]::ReferenceEquals($this, $sender));
$form.Close()
})
$timer.Interval = 10; $timer.Enabled = $true
$null = $form.ShowDialog()
$form.Dispose(); $timer.Dispose()
The above yields: VERBOSE: $this equals $sender? True
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The topic currently only mentions script-block-based ETS members and PowerShell classes.
A quick demonstration:
The above yields:
VERBOSE: $this equals $sender? TrueDocument Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.