WebProxy.BypassList 屬性

定義

取得或設定不使用 Proxy 伺服器的位址陣列。

public:
 property cli::array <System::String ^> ^ BypassList { cli::array <System::String ^> ^ get(); void set(cli::array <System::String ^> ^ value); };
public string[] BypassList { get; set; }
member this.BypassList : string[] with get, set
Public Property BypassList As String()

屬性值

String[]

陣列,包含描述存取時不使用 Proxy 伺服器之 URI 的規則運算式清單。

範例

下列程式碼範例會顯示 物件的屬性 WebProxy ,包括其 BypassList 屬性。

// The following method displays the properties of the 
// specified WebProxy instance.
void DisplayProxyProperties( WebProxy^ proxy )
{
   Console::WriteLine( "Address: {0}", proxy->Address );
   Console::WriteLine( "Bypass on local: {0}", proxy->BypassProxyOnLocal );

   int count = proxy->BypassList->Length;
   if ( count == 0 )
   {
      Console::WriteLine( "The bypass list is empty." );
      return;
   }

   array<String^>^bypass = proxy->BypassList;
   Console::WriteLine( "The bypass list contents:" );
   for ( int i = 0; i < count; i++ )
   {
      Console::WriteLine( bypass[ i ] );

   }
}
// The following method displays the properties of the
// specified WebProxy instance.

public static void DisplayProxyProperties(WebProxy proxy)
{
    Console.WriteLine("Address: {0}", proxy.Address);
    Console.WriteLine( "Bypass on local: {0}", proxy.BypassProxyOnLocal );

    int count = proxy.BypassList.Length;
    if (count == 0)
    {
        Console.WriteLine("The bypass list is empty.");
        return;
    }
    string[] bypass = proxy.BypassList;
    Console.WriteLine("The bypass list contents:");

    for (int i=0; i< count; i++)
    {
        Console.WriteLine(bypass[i]);
    }
}

備註

屬性 BypassList 包含正則運算式的陣列,描述實例直接存取的 URI WebRequest ,而不是透過 Proxy 伺服器。

適用於

另請參閱