mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Maybe<T> now calls T.ToString()
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace mRemoteNG.Tools
|
||||
{
|
||||
@@ -28,5 +29,10 @@ namespace mRemoteNG.Tools
|
||||
{
|
||||
return ((IEnumerable<T>)_maybe).GetEnumerator();
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return _maybe.Any() ? _maybe.First().ToString() : "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user