This documentation is archived and is not being maintained.

SecurityManager.LoadPolicyLevelFromString Method

Loads a PolicyLevel from the specified string.

[Visual Basic]
Public Shared Function LoadPolicyLevelFromString( _
   ByVal str As String, _
   ByVal type As PolicyLevelType _
) As PolicyLevel
public static PolicyLevel LoadPolicyLevelFromString(
 string str,
 PolicyLevelType type
public: static PolicyLevel* LoadPolicyLevelFromString(
 String* str,
 PolicyLevelType type
public static function LoadPolicyLevelFromString(
   str : String,
 type : PolicyLevelType
) : PolicyLevel;


The XML representation of a security policy level in the same form in which it appears in a configuration file.
One of the PolicyLevelType values.

Return Value

The loaded PolicyLevel.


Exception Type Condition
ArgumentNullException The str parameter is a null reference (Nothing in Visual Basic).
ArgumentException The str parameter is not valid.
SecurityException The code that calls this method does not have SecurityPermissionFlag.ControlPolicy.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

SecurityManager Class | SecurityManager Members | System.Security Namespace