1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-14 22:34:09 +02:00

Added out version of TryGetValue

This commit is contained in:
Brian Fiete 2024-06-17 06:32:36 +02:00
parent 0054299049
commit c77c7beabd

View file

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