Applying filters to a WFS layer using the Wfs.Client namespace

All Platform
Filters enable the user to be selective with features are returned from a WFS server, based on a set of criteria. Scalar filters, like the one below, allow queries to be conducted against specific properties of a feature.

A filter is similar to a SQL statement that includes a WHERE clause.  
Select * from US_COUNTY where County = 'York' AND State = 'SC'       

The request uses two 'PropertyIsEqualTo' filters combined with the 'And' filter (which performs the binary AND operation). Capturing the XML request generated by this code shows the structure of the filter created:

The following sample code demonstrates the use of a filter in a WFS request.  This sample code is part of a console application that performs a request, adds the resulting feature to a map, and exports the map to a file.
using MapInfo.Wfs.Client
using MapInfo.Data
using MapInfo.Engine
using MapInfo.Mapping
using System.Drawing

        static void Main(string[] args)
             //The URL of the WFS - Be sure to replace the following URL with your WFS URL
             string URL = "http://IP-address/wfs/GetFeature.ashx";

            //The file to which the map will be exported
            string exportFileName = "WfsClient_cs.gif";
            //Do a GetCapabilities and verify the specified URL is correct
                // Get the WFS capabilities of the WFS server using the HTTP GET method.
                WfsCapabilities Capabilities = WfsClient.GetCapabilities(RequestMethod.GET, URL);
                MessageBox.Show("Please check if " + URL + " is a valid WFS URL");
            // Create the AND filter containing to attribute filters
            IFilter filter1 = new PropertyIsEqualTo(new PropertyName("miwfs","County"), new Literal("York"));
            IFilter filter2 = new PropertyIsEqualTo(new PropertyName("miwfs", "State"), new Literal("SC"));
            And andFilter = new And(new PropertyIsEqualTo[] { (PropertyIsEqualTo)filter1, (PropertyIsEqualTo)filter2 });
            IList queries = new Query[] { new Query(new TypeName("miwfs", "US_COUNTY"), null, andFilter) };
            // We only understand GML3 from our server
            string outputFormat = "GML3";
            // Use the HTTP POST method to send the GetFeature request; -1 returns all features
            MultiFeatureCollection mfc = WfsClient.GetFeature(URL, queries ,outputFormat, -1);

            // Get all features from the USA feature type
            IFeatureCollection fc = mfc[0];

            // Iterate over the Usa MultiFeatureCollection and add each 
            // IFeatureCollection to a MemTable, etc...
            TableInfoMemTable memTableInfo = new TableInfoMemTable("myMemTable");
            foreach (Column c in fc.Columns)
            Table memTable = Session.Current.Catalog.CreateTable(memTableInfo);

            // Create a layer from the MemTable
            FeatureLayer featureLayer = new FeatureLayer(memTable);

            // Create the map and add the layer
            Map map = Session.Current.MapFactory.CreateEmptyMap(new Size(500, 500));

            // Export the map to a file
            using (MapExport mx = new MapExport(map))
                mx.Format = ExportFormat.Gif;

            // Clean up the map

UPDATED:  July 30, 2018