mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-12-05 05:07:47 +00:00
nullable index
make index nullable so ToString can append the index for indexed objects
This commit is contained in:
parent
9a2529c617
commit
b0a6bf7b63
@ -1,5 +1,5 @@
|
|||||||
class IRemote {
|
class IRemote {
|
||||||
[int]$index
|
[Nullable[int]]$index
|
||||||
[Object]$remote
|
[Object]$remote
|
||||||
|
|
||||||
IRemote ([Object]$remote) {
|
IRemote ([Object]$remote) {
|
||||||
@ -44,6 +44,9 @@ class IRemote {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[string] ToString() {
|
[string] ToString() {
|
||||||
|
if ($this.index.HasValue) {
|
||||||
|
return $this.GetType().Name + $this.index
|
||||||
|
}
|
||||||
return $this.GetType().Name
|
return $this.GetType().Name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user