Can anyone Mark Tests as passed or failed using C# in Browserstack

I can’t get Browserstack to answer the question so I wondered if anyone here was already doing it?
Here is my code:
if (ExpText.Equals(ActText))
Assert.AreEqual(ExpText, ActText);
Console.WriteLine(“Message verified Successfully”);
((IJavaScriptExecutor)_IOSdriver).ExecuteScript("browserstack_executor: {“action”: “setSessionStatus”, “arguments”: {“status”:“Passed”, “reason”: " Success not matched “}}”);
Console.WriteLine(“Message Verification Failed”);
((IJavaScriptExecutor)_IOSdriver).ExecuteScript("browserstack_executor: {“action”: “setSessionStatus”, “arguments”: {“status”:“failed”, “reason”: " Success not matched “}}”);