I am working on Xamarin Forms. In Content Page, I want to write some code in separate thread because app is freezing after some random interval.
In my code There is conversion of byte[] to string methods like below
BitConverter.ToString(Data); are taking time to execute, so anybody have resolution on it please share it.
Thanks in advance.
You can make your conversion method's return type to be Task and make it async. Then you can use .NET's multi-threading concept by using Task.Run. For example:
Converter method:
From the place you are calling this method:
While debugging, you can see in thread window that task will run in a separate thread. Enable thread window by ctrl+alt+H while debugging.