From b0a6bf7b63e32f42f416ebe032fc470be26cdbf2 Mon Sep 17 00:00:00 2001 From: pblivingston <71585805+pblivingston@users.noreply.github.com> Date: Tue, 25 Nov 2025 15:32:27 -0500 Subject: [PATCH] nullable index make index nullable so ToString can append the index for indexed objects --- lib/iremote.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/iremote.ps1 b/lib/iremote.ps1 index 735dcb9..e49ae25 100644 --- a/lib/iremote.ps1 +++ b/lib/iremote.ps1 @@ -1,5 +1,5 @@ class IRemote { - [int]$index + [Nullable[int]]$index [Object]$remote IRemote ([Object]$remote) { @@ -44,6 +44,9 @@ class IRemote { } [string] ToString() { + if ($this.index.HasValue) { + return $this.GetType().Name + $this.index + } return $this.GetType().Name } } \ No newline at end of file