19 lines
486 B
C#
19 lines
486 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace UdtSharp
|
|
{
|
|
public static class CoreExtensions
|
|
{
|
|
public static bool TryGetValue(this HashSet<InfoBlock> self, InfoBlock equalValue, out InfoBlock actualValue)
|
|
{
|
|
if (self.Contains(equalValue))
|
|
{
|
|
actualValue = self.First(x=>x==equalValue);
|
|
return true;
|
|
}
|
|
actualValue = null;
|
|
return false;
|
|
}
|
|
}
|
|
} |