System.Net.SocketPermissionAttribute.Host Property

Gets or sets the DNS host name or IP address that is specified by this System.Net.SocketPermissionAttribute.

Syntax

public string Host { get; set; }

Value

A string containing a DNS host name or IP address.

Exceptions

TypeReason
ArgumentException SocketPermissionAttribute.Host is being set and is not null.

Remarks

This property is write-once and specifies the Domain Name Services (DNS) host name to which this permission applies.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0