FileIOPermission.newmethod(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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');
}