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