Compartir a través de


FileIOPermission.newmethod(String, String) Method

Definition

Initializes a new instance of the CodeAccessPermission class.

public:
 void newmethod(System::String ^ _filename, System::String ^ _mode);
public void newmethod (string _filename, string _mode);
override this.newmethod : string * string -> unit
Public Sub newmethod (_filename As String, _mode As String)

Parameters

_filename
String

A String data type that specifies the type of access.

_mode
String

A String data type that specifies the type of access.

Remarks

The following table lists the possible values for the _mode parameter.

R Read
W Write
RW Read and write

The following code example shows a new instance of the FileIoPermission class that specifies read access for the File.txt file.

server static void main(Args args) 
{ 
    FileIoPermission _perm; 
    _perm = new FileIoPermission("c:\\File.txt",'r'); 
}

Applies to