v1.3.0.1 (Epic Store release)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
namespace Barotrauma.Extensions
|
||||
{
|
||||
public static class StructExtensions
|
||||
{
|
||||
public static bool TryGetValue<T>(this T? nullableStruct, out T nonNullable) where T : struct
|
||||
{
|
||||
if (nullableStruct.HasValue)
|
||||
{
|
||||
nonNullable = nullableStruct.Value;
|
||||
return true;
|
||||
}
|
||||
nonNullable = default(T);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user