Maybe<T> now calls T.ToString()

This commit is contained in:
David Sparer
2017-07-29 11:46:16 -05:00
parent d09ecac35d
commit 3961e1844c

View File

@@ -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() : "";
}
}
}