Barotrauma Client Doc
StructExtensions.cs
1 namespace Barotrauma.Extensions
2 {
3  public static class StructExtensions
4  {
5  public static bool TryGetValue<T>(this T? nullableStruct, out T nonNullable) where T : struct
6  {
7  if (nullableStruct.HasValue)
8  {
9  nonNullable = nullableStruct.Value;
10  return true;
11  }
12  nonNullable = default(T);
13  return false;
14  }
15  }
16 }