Skip to main content
Version: SDK-5.9.6

HasReturnValue

public bool HasReturnValue();
public bool HasReturnValue(out string jsonString);

Parameter

ValueTypeDescription
jsonStringstring(Optional) If returnValue exists, it assigns returnValue to the passed argument.

Description

Checks whether returnValue exists in the BackendReturnObject object returned as a result of the request made to the server.
returnValue only exists if the request was successful.

Example

var bro = Backend.BMember.GetUserInfo();

string jsonString = null;
if(bro.HasReturnValue()) {
jsonString = bro.GetReturnValue();
Debug.Log(jsonString);
}

if(bro.HasReturnValue(out jsonString)) {
Debug.Log(jsonString);
}

Return casess

When the returnValue exists
return : true
jsonString : returnValue

When the returnValue does not exist
return : false
jsonString : null