C#

using DotNetBrowser;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CookieFilterSample
{
    /// <summary>
    /// The sample demonstrates how to suppress/filter incoming and outgoing cookies.
    /// </summary>
    class Program
    {
        static void Main(string[] args)
        {
            Browser browser = BrowserFactory.Create();

            // Suppress/filter all incoming and outgoing cookies.
            browser.Context.NetworkService.NetworkDelegate = new MyNetworkDelegate();
        }

        private class MyNetworkDelegate : DefaultNetworkDelegate
        {
            public override bool OnCanSetCookies(String url, List<Cookie> cookies)
            {
                return false;
            }

            public override bool OnCanGetCookies(String url, List<Cookie> cookies)
            {
                return false;
            }

        }
    }
}

VB.NET

Imports DotNetBrowser

Module CookieFilterSample
    Sub Main(ByVal args As String())
        Dim browser As Browser = BrowserFactory.Create()

        'Suppress/filter all incoming and outgoing cookies.
        browser.Context.NetworkService.NetworkDelegate = New MyNetworkDelegate()
    End Sub

    Private Class MyNetworkDelegate
        Inherits DefaultNetworkDelegate

        Public Overrides Function OnCanSetCookies(ByVal url As String, ByVal cookies As List(Of Cookie)) As Boolean
            Return False
        End Function

        Public Overrides Function OnCanGetCookies(ByVal url As String, ByVal cookies As List(Of Cookie)) As Boolean
            Return False
        End Function
    End Class
End Module