How to cancel a running async function in xamarin forms
<p>I called async function in my code , which call rest service and populate a data structure. But somehow i need to cancel that function before its completion , how can i achieve this. </p>

<pre><code>getAdDetails(ad.id,ad.campaign_type);

private async void getAdDetails(int campaign_id, string campaign_type)  {   
// some code here
}
</code></pre>