> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.plainproxies.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# C#

This article provides an example of using a proxy to make an HTTP request with the C# programming language.

# C-Sharp

In this example, we use the Residential proxy below:

`resi.ipv6.plainproxies.com:8080:customer:product--resi6--pass--nicepass`

This proxy is split into four parts separated by colons. We first save the proxy as a string variable, then split it into four parts at each colon :) and then add it, with authentication, to our proxy dictionary.


```
using System;  
using System.Net;  
using System.IO;  
  
class Program  
{  
    static void Main(string[] args)  
    {  
        string proxyAddress = "resi.ipv6.plainproxies.com:8080";  
        string proxyUsername = "customer";  
        string proxyPassword = "product--resi6--pass--nicepass";  
  
        WebProxy proxy = new WebProxy(proxyAddress, true);  
        proxy.Credentials = new NetworkCredential(proxyUsername, proxyPassword);  
  
        HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://google.com");  
        request.Proxy = proxy;  
  
        HttpWebResponse response = (HttpWebResponse)request.GetResponse();  
        StreamReader reader = new StreamReader(response.GetResponseStream());  
        string responseText = reader.ReadToEnd();  
  
        Console.WriteLine(responseText);  
    }  
}

```
