System.Security.PermissionSet.ToString Method

Returns a string representation of the System.Security.PermissionSet.

Syntax

public override string ToString ()

Returns

A representation of the System.Security.PermissionSet.

Remarks

The string representation is useful in debugging to see the state of a System.Security.PermissionSet.

Example

The following example displays the XML that encodes the state of a System.Security.PermissionSet .

C# Example

using System;
using System.Security;
using System.Security.Permissions;

public class PermissionSetToStringExample {
  public static void Main() {

    PermissionSet ps = new PermissionSet(PermissionState.Unrestricted);
    Console.WriteLine(ps.ToString());
  }
}

			

The output is

<PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true"/>

Requirements

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