Hello,
Welcome to our Microsoft Q&A platform!
Because InterstitialAd
is an abstract class, so we cannot new InterstitialAd()
directly, we could create a new class to extend the InterstitialAd
like following code.
To achieve override method.
public class MyInterstitialAd : InterstitialAd
{
private Context context;
public MyInterstitialAd(Context context)
{
this.context = context;
}
public override string AdUnitId => throw new System.NotImplementedException();
public override FullScreenContentCallback FullScreenContentCallback { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
public override IOnPaidEventListener OnPaidEventListener { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
public override ResponseInfo ResponseInfo => throw new System.NotImplementedException();
public override void SetImmersiveMode(bool p0)
{
throw new System.NotImplementedException();
}
public override void Show(Activity p0)
{
throw new System.NotImplementedException();
}
}
Best Regards,
Leon Lu
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.