Skip to main content
Version: 5.11.8

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