Hello everyone,
There is a functions that returns [1,1,0,0,1] in the cloudscript. I want to convert this data into C# boolean array. How can I do this?
Hello everyone,
There is a functions that returns [1,1,0,0,1] in the cloudscript. I want to convert this data into C# boolean array. How can I do this?
I can say all roads lead to Rome. You can search online for more methods but here is my solution.
I assume you will receive a PlayFab JsonArray like [1,0,1,0,1]:
char[] charsforTrim = {'[', ']' }; var strings = onSuccessCallback.FunctionResult.ToString().Trim(charstoTrim).Split(','); var bools = new BitArray(Array.ConvertAll(a,int.Parse)).Cast<bool>().ToArray();
3 People are following this question.