Skip to content

Instantly share code, notes, and snippets.

@santisq
Created March 11, 2026 13:14
Show Gist options
  • Select an option

  • Save santisq/fe16ff9ac34cd324266d4e0dd6c0c93f to your computer and use it in GitHub Desktop.

Select an option

Save santisq/fe16ff9ac34cd324266d4e0dd6c0c93f to your computer and use it in GitHub Desktop.
# Requires module ClassExplorer
$method = [System.Management.Automation.LanguagePrimitives] | fime -f FigureConversion -ParameterCount 3
# Rank: NullToValue
$flag = $null
$converter = $method.Invoke($null, @($null, [int], $flag))
$converter.Invoke($null, [int], $true, $null, [cultureinfo]::InvariantCulture, $null)
# Rank: NullToRef
$flag = $null
$converter = $method.Invoke($null, @($null, [System.IO.FileInfo], $flag))
$converter.Invoke($null, [System.IO.FileInfo], $true, $null, [cultureinfo]::InvariantCulture, $null)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment