Skip to main content
Version: SDK-5.9.6

HasFirstKey

public bool HasFirstKey();
public bool HasFirstKey(out string firstKey);

ValueTypeDescription
firstKeystring(Optional) If firstKey exists, it assigns firstKey in a string format to the passed argument.

Description

Checks if firstKey exists in returnValue.

Example

BackendReturnObject bro = Backend.GameData.Get("tableName", new Where());

string firstKey = null;
if(bro.HasFirstKey()) {
firstKey = bro.FirstKeyString();
}

if(bro.HasFirstKey(out firstKey)) {
Debug.Log(firstKey);
}

Return casess

When firstKey exists in returnValue
return : true
firstKey : firstKey is assigned.

When firstKey does not exist in returnValue
return : false
firstKey : string.Empty

When the returnValue does not exist
return : false
firstKey : string.Empty