소스 검색

Added `out` version of `TryGetValue`

Brian Fiete 1 년 전
부모
커밋
c77c7beabd
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      BeefLibs/corlib/src/Nullable.bf

+ 6 - 0
BeefLibs/corlib/src/Nullable.bf

@@ -70,6 +70,12 @@ namespace System
             outValue = mValue;
             return true;
         }
+
+		public bool TryGetValue(out T outValue)
+		{
+		    outValue = mValue;
+		    return mHasValue;
+		}
         
         public T GetValueOrDefault(T defaultValue)
         {