Export (0) Print
Expand All

SocketPermissionAttribute.Access Property

Gets or sets the network access method allowed by this SocketPermissionAttribute.

[Visual Basic]
Public Property Access As String
[C#]
public string Access {get; set;}
[C++]
public: __property String* get_Access();
public: __property void set_Access(String*);
[JScript]
public function get Access() : String;
public function set Access(String);

Property Value

A string containing the network access method allowed by this instance of SocketPermissionAttribute. Valid values are "Accept" and "Connect."

Exceptions

Exception Type Condition
ArgumentException The Access property is not a null reference (Nothing in Visual Basic) when you attempt to set the value. To specify more than one Access method, use an additional attribute declaration statement.

Remarks

This property is write-once. Valid values for this property correspond to NetworkAccess enumeration values.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Common Language Infrastructure (CLI) Standard

See Also

SocketPermissionAttribute Class | SocketPermissionAttribute Members | System.Net Namespace

Show:
© 2015 Microsoft