System.Security.CodeAccessPermission.FromXml Method

When overridden in a derived class, reconstructs a security object with a specified state from an XML encoding.

Syntax

public abstract void FromXml (SecurityElement elem)

Parameters

elem
The XML encoding to use to reconstruct the security object.

Exceptions

TypeReason
ArgumentException

elem does not contain the XML encoding for a instance of the same type as the current instance.

-or-

The version number of elem is not valid.

Remarks

Custom code that extends security objects needs to implement the CodeAccessPermission.ToXml and CodeAccessPermission.FromXml(SecurityElement) methods to make the objects security-encodable.

Requirements

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